6/22/1
This commit is contained in:
@@ -27,7 +27,7 @@ import 'views/home/Captin/orderCaptin/order_request_page.dart';
|
||||
|
||||
final box = GetStorage();
|
||||
const storage = FlutterSecureStorage();
|
||||
// final PaymobPayment paymobPayment = PaymobPayment();
|
||||
|
||||
final PaymobPayment paymobPayment = PaymobPayment();
|
||||
final PaymobPaymentWallet paymobPaymentWallet = PaymobPaymentWallet();
|
||||
|
||||
@@ -36,13 +36,11 @@ DbSql sql = DbSql.instance;
|
||||
Future<void> backgroundMessageHandler(RemoteMessage message) async {
|
||||
await Firebase.initializeApp();
|
||||
if (message.data.isNotEmpty && message.notification != null) {
|
||||
print(message.notification?.title);
|
||||
FirebaseMessagesController().fireBaseTitles(message);
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> handleBackgroundNotificationClick(RemoteMessage message) async {
|
||||
// Perform any necessary setup or initialization
|
||||
await Firebase.initializeApp();
|
||||
|
||||
var myListString = message.data['DriverList'];
|
||||
@@ -51,7 +49,6 @@ Future<void> handleBackgroundNotificationClick(RemoteMessage message) async {
|
||||
Get.to(() => OrderRequestPage(), arguments: {
|
||||
'myListString': myListString,
|
||||
'DriverList': myList,
|
||||
// 'PolylineJson': myPoints,
|
||||
'body': message.notification?.body,
|
||||
});
|
||||
}
|
||||
@@ -65,15 +62,11 @@ void main() async {
|
||||
}
|
||||
|
||||
await GetStorage.init();
|
||||
// Get.put(DriverCallController());
|
||||
await AC().gAK();
|
||||
print(
|
||||
'local is ${WidgetsBinding.instance.platformDispatcher.locale.countryCode}');
|
||||
|
||||
print(Get.deviceLocale!.countryCode);
|
||||
await AC().gAK();
|
||||
|
||||
Stripe.publishableKey = AK.publishableKey;
|
||||
|
||||
// await LocationBackgroundController().requestLocationPermission();
|
||||
if (Platform.isAndroid || Platform.isIOS) {
|
||||
await Firebase.initializeApp(
|
||||
options: DefaultFirebaseOptions.currentPlatform,
|
||||
@@ -86,30 +79,22 @@ void main() async {
|
||||
FirebaseMessagesController().getNotificationSettings(),
|
||||
FirebaseMessagesController().getToken(),
|
||||
];
|
||||
// cameras = await availableCameras();
|
||||
|
||||
await Future.wait(initializationTasks);
|
||||
SystemChrome.setPreferredOrientations([
|
||||
DeviceOrientation.portraitUp,
|
||||
DeviceOrientation.portraitDown,
|
||||
]);
|
||||
}
|
||||
// PaymobPayment.instance.initialize(
|
||||
// apiKey: AK
|
||||
// .payMobApikey, // from dashboard Select Settings -> Account Info -> API Key
|
||||
// integrationID: int.parse(AK.integrationIdPayMob),
|
||||
// userTokenExpiration: 200,
|
||||
// iFrameID: 837992,
|
||||
// );
|
||||
|
||||
PaymobPayment.instance.initialize(
|
||||
apiKey: AK
|
||||
.payMobApikey, // from dashboard Select Settings -> Account Info -> API Key
|
||||
apiKey: AK.payMobApikey,
|
||||
integrationID: int.parse(AK.integrationIdPayMob),
|
||||
userTokenExpiration: 200,
|
||||
iFrameID: 837992,
|
||||
);
|
||||
PaymobPaymentWallet.instance.initialize(
|
||||
apiKey: AK
|
||||
.payMobApikey, // from dashboard Select Settings -> Account Info -> API Key
|
||||
apiKey: AK.payMobApikey,
|
||||
integrationID: int.parse(AK.integrationIdPayMobWallet),
|
||||
userTokenExpiration: 200,
|
||||
iFrameID: 837992,
|
||||
@@ -121,8 +106,6 @@ void main() async {
|
||||
class MyApp extends StatelessWidget {
|
||||
const MyApp({super.key});
|
||||
|
||||
// This widget is the root of your application.
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
LocaleController localController = Get.put(LocaleController());
|
||||
@@ -134,13 +117,6 @@ class MyApp extends StatelessWidget {
|
||||
locale: localController.language,
|
||||
theme: localController.appTheme,
|
||||
key: UniqueKey(),
|
||||
// routes: {'/':const HomePage()},
|
||||
// home: LoginCaptin());
|
||||
// getPages: [
|
||||
// GetPage(name: '/', page: () => SplashScreen()),
|
||||
// GetPage(
|
||||
// name: '/OrderRequestPage/:id', page: () => OrderRequestPage()),
|
||||
// ],
|
||||
initialRoute: '/',
|
||||
home: SplashScreen());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user