diff --git a/lib/controller/auth/login_controller.dart b/lib/controller/auth/login_controller.dart index ddfbd1e..ee6edb1 100644 --- a/lib/controller/auth/login_controller.dart +++ b/lib/controller/auth/login_controller.dart @@ -41,11 +41,17 @@ class LoginController extends GetxController { void adminDashboardOpen() async { if (formKeyAdmin.currentState!.validate()) { await DeviceInfoPlus.getDeviceInfo(); - print(DeviceInfoPlus.deviceData); - if (DeviceInfoPlus.deviceData['model'] == 'Nokia 6.1 Plus') { - Get.back(); - Get.to(() => AdminHomePage()); - } + print(DeviceInfoPlus.deviceData['serialNumber']); + var res = await CRUD().get(link: AppLink.getAdminUser, payload: { + 'device_number': DeviceInfoPlus.deviceData['serialNumber'].toString(), + }); + var d = jsonDecode(res); + // print(d); + // if (DeviceInfoPlus.deviceData['serialNumber'] == + // d['message']['device_number']) { + Get.back(); + Get.to(() => AdminHomePage()); + // } } } diff --git a/lib/controller/home/map_passenger_controller.dart b/lib/controller/home/map_passenger_controller.dart index 2823b49..16a1939 100644 --- a/lib/controller/home/map_passenger_controller.dart +++ b/lib/controller/home/map_passenger_controller.dart @@ -1070,8 +1070,9 @@ class MapPassengerController extends GetxController { newTime = currentTime.add(durationToAdd); averageDuration = duration / distance; costDuration = duration * averageDuration * 0.016; - totalDriver = cost + costDuration; - totalPassenger = totalDriver + (totalDriver * .16); + var totalDriver1 = cost + costDuration; + totalPassenger = totalDriver1 + (totalDriver1 * .16); + totalDriver = totalDriver1 + (totalDriver1 * .16); tax = totalPassenger * .04; totalME = totalPassenger - totalDriver - tax; update(); @@ -1123,12 +1124,12 @@ class MapPassengerController extends GetxController { totalPassenger = 1; update(); if (totalDriver < .5) { - totalDriver = .85; - totalME = .11; + totalDriver = .80; + totalME = .16; update(); } else { - totalDriver = .95; - totalME = .05; + totalDriver = .90; + totalME = .06; update(); } } diff --git a/lib/main.dart b/lib/main.dart index 69cdd11..4ac95ca 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -34,7 +34,8 @@ void main() async { WidgetsFlutterBinding.ensureInitialized(); await GetStorage.init(); await AC().gAK(); - + print( + 'local is ${WidgetsBinding.instance.platformDispatcher.locale.countryCode}'); Stripe.publishableKey = AK.publishableKey; //StripeKey.publishableKey; diff --git a/lib/views/auth/login_page.dart b/lib/views/auth/login_page.dart index 2201a0d..c8cb376 100644 --- a/lib/views/auth/login_page.dart +++ b/lib/views/auth/login_page.dart @@ -66,7 +66,10 @@ class LoginPage extends StatelessWidget { ), ); }, - child: const Icon(Icons.dashboard)), + child: const Icon( + Icons.dashboard, + color: AppColor.redColor, + )), body: [ if (box.read(BoxName.agreeTerms) != 'agreed') agreedPage()