Initial commit
This commit is contained in:
@@ -1,13 +1,12 @@
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:SEFER/views/widgets/my_dialog.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:SEFER/controller/firebase/firbase_messge.dart';
|
||||
|
||||
import '../../constant/box_name.dart';
|
||||
import '../../constant/links.dart';
|
||||
import '../../constant/style.dart';
|
||||
import '../../main.dart';
|
||||
import '../../views/widgets/elevated_btn.dart';
|
||||
import '../functions/crud.dart';
|
||||
|
||||
class PassengerNotificationController extends GetxController {
|
||||
@@ -21,22 +20,17 @@ class PassengerNotificationController extends GetxController {
|
||||
link: AppLink.getNotificationPassenger,
|
||||
payload: {'passenger_id': box.read(BoxName.passengerID)});
|
||||
if (res == "failure") {
|
||||
Get.defaultDialog(
|
||||
title: 'There is no notification yet'.tr,
|
||||
titleStyle: AppStyle.title,
|
||||
middleText: '',
|
||||
confirm: MyElevatedButton(
|
||||
title: 'Back',
|
||||
onPressed: () {
|
||||
Get.back();
|
||||
Get.back();
|
||||
}));
|
||||
MyDialog().getDialog('There is no notification yet'.tr, '', () {
|
||||
Get.back();
|
||||
Get.back();
|
||||
});
|
||||
} else {
|
||||
notificationData = jsonDecode(res);
|
||||
isloading = false;
|
||||
update();
|
||||
}
|
||||
notificationData = jsonDecode(res);
|
||||
// sql.insertData(notificationData['message'], TableName.captainNotification);
|
||||
|
||||
isloading = false;
|
||||
update();
|
||||
// sql.insertData(notificationData['message'], TableName.captainNotification);
|
||||
}
|
||||
|
||||
updateNotification(String id) async {
|
||||
|
||||
Reference in New Issue
Block a user