9/8/1-captin
This commit is contained in:
112
lib/controller/auth/captin/login_captin_controller.dart
Normal file
112
lib/controller/auth/captin/login_captin_controller.dart
Normal file
@@ -0,0 +1,112 @@
|
||||
import 'dart:convert';
|
||||
import 'dart:math';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_secure_storage/flutter_secure_storage.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:ride/constant/box_name.dart';
|
||||
import 'package:ride/constant/links.dart';
|
||||
import 'package:ride/controller/functions/crud.dart';
|
||||
import 'package:ride/controller/functions/secure_storage.dart';
|
||||
import 'package:ride/main.dart';
|
||||
import 'package:ride/views/auth/verify_email_page.dart';
|
||||
import 'package:ride/views/home/map_page.dart';
|
||||
|
||||
class LoginCaptinController extends GetxController {
|
||||
final formKey = GlobalKey<FormState>();
|
||||
TextEditingController emailController = TextEditingController();
|
||||
TextEditingController phoneController = TextEditingController();
|
||||
TextEditingController passwordController = TextEditingController();
|
||||
bool isAgreeTerms = false;
|
||||
bool isloading = false;
|
||||
final FlutterSecureStorage _storage = const FlutterSecureStorage();
|
||||
|
||||
void changeAgreeTerm() {
|
||||
isAgreeTerms = !isAgreeTerms;
|
||||
print(isAgreeTerms);
|
||||
update();
|
||||
}
|
||||
|
||||
void saveAgreementTerms() {
|
||||
box.write(BoxName.agreeTerms, 'agreed');
|
||||
update();
|
||||
}
|
||||
|
||||
void login() async {
|
||||
isloading = true;
|
||||
update();
|
||||
var res = await CRUD().get(link: AppLink.loginCaptin, payload: {
|
||||
'email': emailController.text,
|
||||
'phone': phoneController.text,
|
||||
'password': passwordController.text
|
||||
});
|
||||
print(res);
|
||||
if (res == 'Failure') {
|
||||
isloading = false;
|
||||
update();
|
||||
Get.snackbar('Failure', '', backgroundColor: Colors.red);
|
||||
} else {
|
||||
var jsonDecoeded = jsonDecode(res);
|
||||
// print(jsonDecoeded);
|
||||
if (jsonDecoeded.isNotEmpty) {
|
||||
if (jsonDecoeded['status'] == 'success') {
|
||||
print(jsonDecoeded['data'][0]['verified']);
|
||||
if (jsonDecoeded['data'][0]['verified'] == 1) {
|
||||
box.write(BoxName.driverID, jsonDecoeded['data'][0]['id']);
|
||||
box.write(BoxName.emailDriver, jsonDecoeded['data'][0]['email']);
|
||||
box.write(
|
||||
BoxName.nameDriver, jsonDecoeded['data'][0]['first_name']);
|
||||
box.write(BoxName.phoneDriver, jsonDecoeded['data'][0]['phone']);
|
||||
SecureStorage()
|
||||
.saveData(BoxName.passwordDriver, passwordController.text);
|
||||
Get.offAll(() => const MapPage());
|
||||
isloading = false;
|
||||
update();
|
||||
print(box.read(BoxName.driverID).toString());
|
||||
print(box.read(BoxName.tokenDriver));
|
||||
await CRUD().post(link: AppLink.addTokensDriver, payload: {
|
||||
'token': box.read(BoxName.tokenDriver),
|
||||
'captain_id': box.read(BoxName.driverID).toString()
|
||||
}).then((value) => print('cccc'));
|
||||
} else {
|
||||
isloading = false;
|
||||
update();
|
||||
Get.defaultDialog(
|
||||
title: 'You must Verify email !.'.tr,
|
||||
middleText: '',
|
||||
backgroundColor: Colors.yellow[300],
|
||||
onConfirm: () async {
|
||||
int randomNumber = Random().nextInt(100000) + 1;
|
||||
await CRUD().post(link: AppLink.sendVerifyEmail, payload: {
|
||||
'email': emailController.text,
|
||||
'token': randomNumber.toString(),
|
||||
}).then((value) => print(value));
|
||||
Get.to(() => const VerifyEmailPage());
|
||||
},
|
||||
);
|
||||
}
|
||||
} else if (jsonDecoeded['status'] == 'Failure') {
|
||||
Get.snackbar(jsonDecoeded['status'], jsonDecoeded['data'],
|
||||
backgroundColor: Colors.redAccent);
|
||||
isloading = false;
|
||||
update();
|
||||
}
|
||||
} else {
|
||||
print('res is null');
|
||||
isloading = false;
|
||||
update();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// goToMapPage() {
|
||||
// if (box.read(BoxName.email) != null) {
|
||||
// Get.offAll(() => const MapPage());
|
||||
// }
|
||||
// }
|
||||
|
||||
@override
|
||||
void onInit() {
|
||||
super.onInit();
|
||||
}
|
||||
}
|
||||
@@ -12,8 +12,6 @@ import 'package:ride/main.dart';
|
||||
import 'package:ride/views/auth/verify_email_page.dart';
|
||||
import 'package:ride/views/home/map_page.dart';
|
||||
|
||||
import '../firebase/firbase_messge.dart';
|
||||
|
||||
class LoginController extends GetxController {
|
||||
final formKey = GlobalKey<FormState>();
|
||||
TextEditingController emailController = TextEditingController();
|
||||
@@ -57,8 +55,7 @@ class LoginController extends GetxController {
|
||||
box.write(BoxName.email, jsonDecoeded['data'][0]['email']);
|
||||
box.write(BoxName.name, jsonDecoeded['data'][0]['first_name']);
|
||||
box.write(BoxName.phone, jsonDecoeded['data'][0]['phone']);
|
||||
SecureStorage()
|
||||
.saveData(BoxName.passwoerd, passwordController.text);
|
||||
SecureStorage().saveData(BoxName.password, passwordController.text);
|
||||
Get.offAll(() => MapPage());
|
||||
isloading = false;
|
||||
update();
|
||||
|
||||
@@ -9,12 +9,14 @@ import 'package:ride/constant/style.dart';
|
||||
import 'package:ride/controller/functions/crud.dart';
|
||||
import 'package:ride/controller/functions/launch.dart';
|
||||
import 'package:ride/controller/functions/toast.dart';
|
||||
import 'package:ride/views/home/profile/promos_passenger_page.dart';
|
||||
import 'package:ride/views/widgets/elevated_btn.dart';
|
||||
|
||||
import '../../constant/box_name.dart';
|
||||
import '../../constant/credential.dart';
|
||||
import '../../constant/links.dart';
|
||||
import '../../main.dart';
|
||||
import '../../views/orderCaptin/order_request_page.dart';
|
||||
|
||||
class FirebasMessagesController extends GetxController {
|
||||
final fcmToken = FirebaseMessaging.instance;
|
||||
@@ -92,15 +94,127 @@ class FirebasMessagesController extends GetxController {
|
||||
Future getToken() async {
|
||||
fcmToken.getToken().then((token) {
|
||||
box.write(BoxName.tokenFCM, token);
|
||||
box.write(BoxName.tokenDriver, token);
|
||||
print(token);
|
||||
});
|
||||
|
||||
FirebaseMessaging.onMessage.listen((RemoteMessage message) {
|
||||
if (message.data.isNotEmpty) {
|
||||
if (message.notification!.title!.contains('Order')) {
|
||||
var myListString = message.data['myList'];
|
||||
var myList = jsonDecode(myListString) as List<dynamic>;
|
||||
Get.to(() => const OrderRequestPage(), arguments: {
|
||||
'myListString': myListString,
|
||||
'myList': myList,
|
||||
'body': message.notification!.body
|
||||
});
|
||||
// Get.defaultDialog(
|
||||
// barrierDismissible: false,
|
||||
// title: message.notification!.title.toString(),
|
||||
// content: Column(
|
||||
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||
// children: [
|
||||
// // Text(message.notification!.body.toString()),
|
||||
// Padding(
|
||||
// padding: const EdgeInsets.all(8.0),
|
||||
// child: TextButton.icon(
|
||||
// onPressed: () {
|
||||
// String mapUrl =
|
||||
// 'https://www.google.com/maps/dir/${myList[0]}/${myList[1]}/';
|
||||
// print(mapUrl);
|
||||
// launchUrl1(mapUrl);
|
||||
// },
|
||||
// icon: const Icon(Icons.map),
|
||||
// label: Text('Rouats of Trip'.tr)),
|
||||
// ),
|
||||
|
||||
// Padding(
|
||||
// padding: const EdgeInsets.all(8.0),
|
||||
// child: Text(
|
||||
// 'Tatal From Passenger is '.tr +
|
||||
// double.parse(myList[2]).toStringAsFixed(2),
|
||||
// style: AppStyle.title,
|
||||
// ),
|
||||
// ),
|
||||
// Padding(
|
||||
// padding: const EdgeInsets.all(8.0),
|
||||
// child: Text(
|
||||
// 'Tatal For You is '.tr +
|
||||
// double.parse(myList[3]).toStringAsFixed(2),
|
||||
// style: AppStyle.title,
|
||||
// ),
|
||||
// ),
|
||||
// Padding(
|
||||
// padding: const EdgeInsets.all(8.0),
|
||||
// child: Text(
|
||||
// 'Distance is '.tr + myList[5].toString() + ' KM'.tr,
|
||||
// style: AppStyle.title,
|
||||
// ),
|
||||
// ),
|
||||
// Padding(
|
||||
// padding: const EdgeInsets.all(8.0),
|
||||
// child: Text(
|
||||
// 'Duration of Trip is '.tr +
|
||||
// myList[4].toString() +
|
||||
// ' Minutes'.tr,
|
||||
// style: AppStyle.title,
|
||||
// ),
|
||||
// ),
|
||||
// Padding(
|
||||
// padding: const EdgeInsets.all(8.0),
|
||||
// child: Row(
|
||||
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
// children: [
|
||||
// MyElevatedButton(
|
||||
// title: 'Apply Order'.tr,
|
||||
// onPressed: () async {
|
||||
// await CRUD().postFromDialogue(
|
||||
// link: AppLink.addDriverOrder,
|
||||
// payload: {
|
||||
// 'driver_id': myList[6].toString(),
|
||||
// // box.read(BoxName.driverID).toString(),
|
||||
// 'order_id':
|
||||
// message.notification!.body.toString(),
|
||||
// 'status': 'Apply'
|
||||
// });
|
||||
// },
|
||||
// ),
|
||||
// MyElevatedButton(
|
||||
// title: 'Refuse Order'.tr,
|
||||
// onPressed: () async {
|
||||
// await CRUD().postFromDialogue(
|
||||
// link: AppLink.addDriverOrder,
|
||||
// payload: {
|
||||
// 'driver_id': myList[6].toString(),
|
||||
// // box.read(BoxName.driverID).toString(),
|
||||
// 'order_id':
|
||||
// message.notification!.body.toString(),
|
||||
// 'status': 'Refused'
|
||||
// });
|
||||
// },
|
||||
// kolor: AppColor.redColor,
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// )
|
||||
// ],
|
||||
// ));
|
||||
} else if (message.notification!.title!.contains('Promo')) {
|
||||
Get.to(const PromosPassengerPage());
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
FirebaseMessaging.onMessageOpenedApp.listen((RemoteMessage message) {
|
||||
print(
|
||||
'onMessageOpenedApp: ${message.notification!.title} ${message.notification!.body}');
|
||||
RemoteNotification? notification = message.notification;
|
||||
if (message.data.isNotEmpty) {
|
||||
if (message.notification!.title!.contains('Order')) {
|
||||
var myListString = message.data['myList'];
|
||||
var myList = jsonDecode(myListString) as List<dynamic>;
|
||||
Get.defaultDialog(
|
||||
barrierDismissible: true,
|
||||
title: message.notification!.title.toString(),
|
||||
content: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
@@ -111,7 +225,7 @@ class FirebasMessagesController extends GetxController {
|
||||
child: TextButton.icon(
|
||||
onPressed: () {
|
||||
String mapUrl =
|
||||
'https://www.google.com/maps/dir/${myList[0]}/${myList[0]}/';
|
||||
'https://www.google.com/maps/dir/${myList[0]}/${myList[1]}/';
|
||||
print(mapUrl);
|
||||
launchUrl1(mapUrl);
|
||||
},
|
||||
@@ -191,19 +305,7 @@ class FirebasMessagesController extends GetxController {
|
||||
],
|
||||
));
|
||||
} else if (message.notification!.title!.contains('Promo')) {
|
||||
// Get.to(page)
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
FirebaseMessaging.onMessageOpenedApp.listen((RemoteMessage message) {
|
||||
print(
|
||||
'onMessageOpenedApp: ${message.notification!.title} ${message.notification!.body}');
|
||||
RemoteNotification? notification = message.notification;
|
||||
if (notification != null) {
|
||||
print('onMessageOpenedApp: ${notification.title} ${notification.body}');
|
||||
if (message.notification!.title!.contains('SEFER')) {
|
||||
Get.snackbar('SEFER', 'message', backgroundColor: AppColor.redColor);
|
||||
Get.to(const PromosPassengerPage());
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -306,8 +408,8 @@ class FirebasMessagesController extends GetxController {
|
||||
// });
|
||||
// }
|
||||
|
||||
void sendNotificationDriverId(String title, body, Strin1, Strin2, Strin3,
|
||||
Strin4, Strin5, Strin6, String7, token) async {
|
||||
void sendNotificationDriverId(String title, body, strin1, strin2, strin3,
|
||||
strin4, strin5, strin6, string7, string8, token) async {
|
||||
http
|
||||
.post(Uri.parse('https://fcm.googleapis.com/fcm/send'),
|
||||
headers: <String, String>{
|
||||
@@ -321,8 +423,16 @@ class FirebasMessagesController extends GetxController {
|
||||
'sound': 'true'
|
||||
},
|
||||
'data': {
|
||||
'myList': jsonEncode(
|
||||
[Strin1, Strin2, Strin3, Strin4, Strin5, Strin6, String7]),
|
||||
'myList': jsonEncode([
|
||||
strin1,
|
||||
strin2,
|
||||
strin3,
|
||||
strin4,
|
||||
strin5,
|
||||
strin6,
|
||||
string7,
|
||||
string8
|
||||
]),
|
||||
},
|
||||
'priority': 'high',
|
||||
'to': token,
|
||||
|
||||
84
lib/controller/functions/locaton_controller.dart
Normal file
84
lib/controller/functions/locaton_controller.dart
Normal file
@@ -0,0 +1,84 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:get/get.dart';
|
||||
import 'package:google_maps_flutter/google_maps_flutter.dart';
|
||||
import 'package:location/location.dart';
|
||||
import 'package:ride/constant/box_name.dart';
|
||||
import 'package:ride/constant/links.dart';
|
||||
import 'package:ride/controller/functions/crud.dart';
|
||||
import 'package:ride/main.dart';
|
||||
|
||||
class LocationController extends GetxController {
|
||||
LocationData? _currentLocation;
|
||||
late Location location;
|
||||
bool isloading = false;
|
||||
LatLng mylocation = const LatLng(32.3, 36.3);
|
||||
|
||||
LocationData? get currentLocation => _currentLocation;
|
||||
Timer? _locationTimer;
|
||||
@override
|
||||
void onInit() {
|
||||
super.onInit();
|
||||
location = Location();
|
||||
getLocation();
|
||||
startLocationUpdates();
|
||||
}
|
||||
|
||||
void startLocationUpdates() async {
|
||||
// Start the timer to get location every 20 seconds
|
||||
_locationTimer = Timer.periodic(const Duration(seconds: 20), (timer) async {
|
||||
await getLocation();
|
||||
|
||||
await CRUD().post(link: AppLink.addCarsLocationByPassenger, payload: {
|
||||
'driver_id': box.read(BoxName.driverID).toString(),
|
||||
'latitude': mylocation!.latitude.toString(),
|
||||
'longitude': mylocation!.longitude.toString(),
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Future<void> getLocation() async {
|
||||
isloading = true;
|
||||
update();
|
||||
bool serviceEnabled;
|
||||
PermissionStatus permissionGranted;
|
||||
|
||||
// Check if location services are enabled
|
||||
serviceEnabled = await location.serviceEnabled();
|
||||
if (!serviceEnabled) {
|
||||
serviceEnabled = await location.requestService();
|
||||
if (!serviceEnabled) {
|
||||
// Location services are still not enabled, handle the error
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Check if the app has permission to access location
|
||||
permissionGranted = await location.hasPermission();
|
||||
if (permissionGranted == PermissionStatus.denied) {
|
||||
permissionGranted = await location.requestPermission();
|
||||
if (permissionGranted != PermissionStatus.granted) {
|
||||
// Location permission is still not granted, handle the error
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Configure location accuracy
|
||||
// LocationAccuracy desiredAccuracy = LocationAccuracy.high;
|
||||
|
||||
// Get the current location
|
||||
LocationData _locationData = await location.getLocation();
|
||||
mylocation =
|
||||
(_locationData.latitude != null && _locationData.longitude != null
|
||||
? LatLng(_locationData.latitude!, _locationData.longitude!)
|
||||
: null)!;
|
||||
|
||||
// Print location details
|
||||
print('Accuracy: ${_locationData.accuracy}');
|
||||
print('Latitude: ${_locationData.latitude}');
|
||||
print('Longitude: ${_locationData.longitude}');
|
||||
print('Time: ${_locationData.time}');
|
||||
isloading = false;
|
||||
update();
|
||||
}
|
||||
}
|
||||
@@ -130,10 +130,11 @@ class MapController extends GetxController {
|
||||
print('rideConfirm= $rideConfirm');
|
||||
|
||||
await CRUD().post(link: AppLink.addRides, payload: {
|
||||
"start_location":
|
||||
'${data[0]["start_location"]['lat']},${data[0]["start_location"]['lng']}',
|
||||
"end_location":
|
||||
'${data[0]["end_location"]['lat']},${data[0]["end_location"]['lng']}',
|
||||
"start_location": '${data[0]['start_address']}',
|
||||
|
||||
// '${data[0]["start_location"]['lat']},${data[0]["start_location"]['lng']}',
|
||||
"end_location": '${data[0]['end_address']}',
|
||||
// '${data[0]["end_location"]['lat']},${data[0]["end_location"]['lng']}',
|
||||
"date": DateTime.now().toString(),
|
||||
"time": DateTime.now().toString(),
|
||||
"endtime": durationToAdd.toString(),
|
||||
@@ -147,13 +148,16 @@ class MapController extends GetxController {
|
||||
}).then((value) {
|
||||
// print(jsonDecode(value)['message']);
|
||||
List<String> body = [
|
||||
// '${data[0]['start_address']}',
|
||||
// '${data[0]['end_address']}',
|
||||
'${data[0]["start_location"]['lat']},${data[0]["start_location"]['lng']}',
|
||||
'${data[0]["end_location"]['lat']},${data[0]["end_location"]['lng']}',
|
||||
totalPassenger.toString(),
|
||||
totalDriver.toString(),
|
||||
duration.toString(),
|
||||
distance.toString(),
|
||||
dataCarsLocationByPassenger['message'][0]['id'].toString()
|
||||
dataCarsLocationByPassenger['message'][0]['id'].toString(),
|
||||
box.read(BoxName.pasengerID).toString()
|
||||
];
|
||||
FirebasMessagesController().sendNotificationDriverId(
|
||||
'Order',
|
||||
@@ -165,7 +169,7 @@ class MapController extends GetxController {
|
||||
body[4],
|
||||
body[5],
|
||||
body[6],
|
||||
|
||||
body[7],
|
||||
box.read(BoxName.tokenFCM).toString(), //TODO change to Driver
|
||||
);
|
||||
});
|
||||
@@ -307,7 +311,7 @@ class MapController extends GetxController {
|
||||
}
|
||||
|
||||
// Configure location accuracy
|
||||
// LocationAccuracy desiredAccuracy = LocationAccuracy.high;
|
||||
LocationAccuracy desiredAccuracy = LocationAccuracy.high;
|
||||
|
||||
// Get the current location
|
||||
LocationData _locationData = await location.getLocation();
|
||||
@@ -808,8 +812,8 @@ class MapController extends GetxController {
|
||||
@override
|
||||
void onInit() async {
|
||||
await getLocation();
|
||||
// await getCarsLocationByPassenger();
|
||||
// getNearestDriverByPassengerLocation();
|
||||
await getCarsLocationByPassenger();
|
||||
getNearestDriverByPassengerLocation();
|
||||
addCustomPicker();
|
||||
addCustomCarIcon();
|
||||
startMarkerReloading();
|
||||
@@ -819,7 +823,7 @@ class MapController extends GetxController {
|
||||
}
|
||||
|
||||
class CarLocation {
|
||||
final int id;
|
||||
final String id;
|
||||
final double latitude;
|
||||
final double longitude;
|
||||
final double distance;
|
||||
|
||||
@@ -28,7 +28,7 @@ class OrderHistoryController extends GetxController {
|
||||
var jsonDecoded = jsonDecode(res);
|
||||
|
||||
orderHistoryListPassenger = jsonDecoded['data'];
|
||||
print(orderHistoryListPassenger);
|
||||
// print(orderHistoryListPassenger);
|
||||
isloading = false;
|
||||
update();
|
||||
}
|
||||
|
||||
32
lib/controller/home/profile/promos_controller.dart
Normal file
32
lib/controller/home/profile/promos_controller.dart
Normal file
@@ -0,0 +1,32 @@
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:get/get.dart';
|
||||
import 'package:ride/constant/links.dart';
|
||||
import 'package:ride/controller/functions/crud.dart';
|
||||
|
||||
class PromosController extends GetxController {
|
||||
List<dynamic> promoList = [];
|
||||
bool isloading = true;
|
||||
|
||||
@override
|
||||
void onInit() {
|
||||
getPromoBytody();
|
||||
super.onInit();
|
||||
}
|
||||
|
||||
Future getPromoBytody() async {
|
||||
var res = await CRUD().get(link: AppLink.getPromoBytody, payload: {});
|
||||
if (res.toString() == 'failure') {
|
||||
Get.snackbar('failure', 'message');
|
||||
isloading = false;
|
||||
update();
|
||||
} else {
|
||||
var jsonDecoded = jsonDecode(res);
|
||||
|
||||
promoList = jsonDecoded['message'];
|
||||
print(promoList);
|
||||
isloading = false;
|
||||
update();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -14,26 +14,33 @@ class PaymentController extends GetxController {
|
||||
bool isWalletCheced = true;
|
||||
bool isCashCheced = false;
|
||||
bool isWalletFound = false;
|
||||
bool isPromoSheetDialogue = false;
|
||||
final formKey = GlobalKey<FormState>();
|
||||
final promo = TextEditingController();
|
||||
double totalPassenger = MapController().totalPassenger;
|
||||
int? selectedAmount;
|
||||
List<dynamic> totalPassengerWalletDetails = [];
|
||||
String passengerTotalWalletAmount = '';
|
||||
void updateSelectedAmount(int value) {
|
||||
selectedAmount = value;
|
||||
update();
|
||||
}
|
||||
|
||||
void changePromoSheetDialogue() {
|
||||
isPromoSheetDialogue = !isPromoSheetDialogue;
|
||||
update();
|
||||
}
|
||||
|
||||
getPassengerWallet() async {
|
||||
isloading = true;
|
||||
update();
|
||||
// box.write(BoxName.passengerWalletFound, isWalletFound);
|
||||
// totalPassengerWalletDetails = box.read(BoxName.passengerWalletDetails);
|
||||
|
||||
// if (box.read(BoxName.passengerWalletTotal).toString().isEmpty) {
|
||||
await CRUD().get(
|
||||
link: AppLink.getWalletByPassenger,
|
||||
payload: {'passenger_id': box.read(BoxName.pasengerID)}).then((value) {
|
||||
box.write(BoxName.passengerWalletTotal,
|
||||
jsonDecode(value)['message'][0]['total'].toString());
|
||||
});
|
||||
// }
|
||||
|
||||
isloading = false;
|
||||
update();
|
||||
|
||||
Reference in New Issue
Block a user