12/26/1
This commit is contained in:
@@ -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());
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user