fist commit ftc staff app clone

This commit is contained in:
2024-08-01 13:46:46 +05:30
commit bf9064a9c9
515 changed files with 42796 additions and 0 deletions

View File

@@ -0,0 +1 @@
export "notifications_list_screen_controller.dart";

View File

@@ -0,0 +1,50 @@
import 'package:flutter/material.dart';
import 'package:ftc_mobile_app/utilities/extensions/custom_extensions.dart';
import 'package:ftc_mobile_app/utilities/frequent_functions.dart';
import 'package:ftc_mobile_app/web_services/notification_services.dart';
import 'package:get/get.dart';
class NotificationListScreenController extends GetxController {
final GlobalKey<ScaffoldState> screenKey = GlobalKey<ScaffoldState>();
RxBool privacyPolicyAccepted = false.obs;
final String privacyPolicy =
"A quick preview of the text will be shown here. A quick preview of the text will be shown here. shown here. A quick preview of the text will be shown here. A quick preview of the text will be shown here. A quick preview of the text will be shown here. A quick preview of the text will be shown here. A quick preview of the text will be shown here.\n shown here. A quick preview of the text will be shown here. A quick preview of the text will be shown here. A quick preview of the text will be shown here. A quick preview of the text will be shown here. A quick preview of the text will be shown here.\n shown here. A quick preview of the text will be shown here. A quick preview of the text will be shown here. A quick preview of the text will be shown here.";
// RxInt selectedIndex = 4.obs;
@override
void onReady() {
getNotifications();
super.onReady();
}
void removeFocus() {
FocusScope.of(screenKey.currentContext!).unfocus();
}
Future<void> getNotifications() async {
// serviceUsersList.clear();
// _skip = 0;
var response = await NotificationService().getNotifications().showLoader();
if (response.success == true) {
// if (response.data?.users?.isNotEmpty == true) {
// _skip += _limit;
// serviceUsersList.value = response.data?.users ?? <UserData>[];
// canLoadMore.value = true;
// } else {
// canLoadMore.value = searchText.isEmpty;
// }
} else {
if (response.message.isNullOrEmptyNot()) {
FrequentFunctions.showToast(message: response.message!);
}
}
}
@override
void dispose() {
Get.delete<NotificationListScreenController>();
super.dispose();
}
}