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