video view more

This commit is contained in:
Rajshinde046
2024-04-25 13:24:58 +05:30
parent e24c96ae17
commit 8bec4c778b
13 changed files with 1059 additions and 95 deletions

View File

@@ -1,12 +1,15 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:just_audio/just_audio.dart';
import 'package:traderscircuit/Utils/base_manager.dart';
import 'package:traderscircuit/model/ContentBytesModel/content_bytes_categories_model.dart';
import 'package:traderscircuit/model/ContentBytesModel/content_bytes_model.dart';
import 'package:traderscircuit/view_model/ContentBytesApi/content_bytes_api.dart';
import '../view/Sidemenu/ContentByte/ContentBytes.dart';
class ContentBytesController extends GetxController {
RxBool isLoading = true.obs;
ContentBytesCategoriesModel contentBytesCategoriesModel =
ContentBytesCategoriesModel();
ContentBytesModel contentBytesModel = ContentBytesModel();
@@ -178,4 +181,41 @@ class ContentBytesController extends GetxController {
titlePlayingList![index] = true;
}
}
// RxList<Video> searchResults = <Video>[].obs;
// Future<void> getContentBytesDataVideo(String query) async {
// // Set isLoading to true if needed
// isLoading.value = true;
// try {
// // Make API call to fetch search results based on the query
// final response = await ContentBytesApi().getContentBytesData({
// // Pass query parameters if needed
// 'search_data': query,
// 'content_type': "video",
// 'category_id': "",
// });
// // Check if the API call was successful
// if (response.status == ResponseStatus.SUCCESS) {
// // Parse the response data into a list of videos
// final List<dynamic> responseData = response.data['data']['video'];
// searchResults.value =
// responseData.map((data) => Video.fromJson(data)).toList();
// // Notify listeners about the changes to the searchResults list
// update();
// } else {
// // Handle API call failure
// // You may show an error message or handle it as needed
// }
// } catch (e) {
// // Handle exceptions
// // You may show an error message or handle it as needed
// } finally {
// // Set isLoading to false after the API call completes
// isLoading.value = false;
// }
// }
}