video view more
This commit is contained in:
@@ -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;
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user