5/2/driver2
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:SEFER/controller/payment/paymob/paymob_response.dart';
|
||||
import 'package:SEFER/views/widgets/elevated_btn.dart';
|
||||
import 'package:firebase_core/firebase_core.dart';
|
||||
import 'package:firebase_messaging/firebase_messaging.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
@@ -40,13 +41,6 @@ Future<void> backgroundMessageHandler(RemoteMessage message) async {
|
||||
FirebaseMessagesController().fireBaseTitles(message);
|
||||
}
|
||||
|
||||
// @pragma('vm:entry-point')
|
||||
// Future<void> backgroundLocation() async {
|
||||
// await LocationBackgroundController().startBackLocation().then((location) {
|
||||
// print('This is current Location ${location.toMap()}');
|
||||
// });
|
||||
// }
|
||||
|
||||
void main() async {
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
WakelockPlus.enable();
|
||||
@@ -63,9 +57,17 @@ void main() async {
|
||||
|
||||
print(Get.deviceLocale!.countryCode);
|
||||
Stripe.publishableKey = AK.publishableKey;
|
||||
if (box.read(BoxName.driverID) != null) {
|
||||
Get.put(LocationBackgroundController());
|
||||
}
|
||||
// if (box.read(BoxName.driverID) != null) {
|
||||
Get.defaultDialog(
|
||||
title: 'Gps required',
|
||||
middleText: '',
|
||||
confirm: MyElevatedButton(
|
||||
title: 'ok'.tr,
|
||||
onPressed: () {
|
||||
Get.put(LocationBackgroundController());
|
||||
}));
|
||||
|
||||
// }
|
||||
if (Platform.isAndroid || Platform.isIOS) {
|
||||
await Firebase.initializeApp(
|
||||
options: DefaultFirebaseOptions.currentPlatform,
|
||||
|
||||
Reference in New Issue
Block a user