fist commit ftc staff app clone
This commit is contained in:
@@ -0,0 +1 @@
|
||||
export "notifications_list_screen_controller.dart";
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user