25-2/7/1
This commit is contained in:
@@ -66,6 +66,11 @@ class MyTranslation extends Translations {
|
||||
|
||||
//firebase above
|
||||
|
||||
//
|
||||
'Share App': "مشاركة التطبيق",
|
||||
"Wallet": "المحفظة",
|
||||
"Profile": "الملف الشخصي",
|
||||
"Contact Support": "اتصل بالدعم",
|
||||
//
|
||||
"Where to": "على فين؟",
|
||||
"Where are you going?": "رايح فين؟",
|
||||
|
||||
@@ -2,6 +2,10 @@ import 'dart:io';
|
||||
import 'dart:math';
|
||||
|
||||
import 'package:Tripz/controller/payment/paymob/paymob_response.dart';
|
||||
import 'package:Tripz/views/home/HomePage/contact_us.dart';
|
||||
import 'package:Tripz/views/home/HomePage/share_app_page.dart';
|
||||
import 'package:Tripz/views/home/my_wallet/passenger_wallet.dart';
|
||||
import 'package:Tripz/views/home/profile/passenger_profile_page.dart';
|
||||
import 'package:firebase_core/firebase_core.dart';
|
||||
import 'package:firebase_messaging/firebase_messaging.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
@@ -10,6 +14,7 @@ import 'package:flutter_stripe/flutter_stripe.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:get_storage/get_storage.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:quick_actions/quick_actions.dart';
|
||||
import 'package:wakelock_plus/wakelock_plus.dart';
|
||||
import 'constant/api_key.dart';
|
||||
import 'constant/info.dart';
|
||||
@@ -23,7 +28,6 @@ import 'controller/payment/paymob/paymob_wallet.dart';
|
||||
import 'firebase_options.dart';
|
||||
import 'models/db_sql.dart';
|
||||
import 'splash_screen_page.dart';
|
||||
import 'views/home/HomePage/trip_monitor/trip_monitor.dart';
|
||||
|
||||
final box = GetStorage();
|
||||
const storage = FlutterSecureStorage();
|
||||
@@ -103,6 +107,44 @@ void main() async {
|
||||
);
|
||||
final AppInitializer initializer = AppInitializer();
|
||||
await initializer.initializeApp();
|
||||
|
||||
final QuickActions quickActions = QuickActions();
|
||||
|
||||
quickActions.initialize((String shortcutType) {
|
||||
print('Activated shortcut: $shortcutType');
|
||||
if (shortcutType == 'share_app') {
|
||||
Get.toNamed('/shareApp');
|
||||
} else if (shortcutType == 'wallet') {
|
||||
Get.toNamed('/wallet');
|
||||
} else if (shortcutType == 'profile') {
|
||||
Get.toNamed('/profile');
|
||||
} else if (shortcutType == 'contact_support') {
|
||||
Get.toNamed('/contactSupport');
|
||||
}
|
||||
});
|
||||
quickActions.setShortcutItems(<ShortcutItem>[
|
||||
ShortcutItem(
|
||||
type: 'share_app',
|
||||
localizedTitle: 'Share App'.tr,
|
||||
icon: 'icon_main',
|
||||
),
|
||||
ShortcutItem(
|
||||
type: 'wallet',
|
||||
localizedTitle: 'Wallet'.tr,
|
||||
icon: 'icon_wallet',
|
||||
),
|
||||
ShortcutItem(
|
||||
type: 'profile',
|
||||
localizedTitle: 'Profile'.tr,
|
||||
icon: 'icon_user',
|
||||
),
|
||||
ShortcutItem(
|
||||
type: 'contact_support',
|
||||
localizedTitle: 'Contact Support'.tr,
|
||||
icon: 'icon_support',
|
||||
),
|
||||
]);
|
||||
|
||||
runApp(const MyApp());
|
||||
}
|
||||
|
||||
@@ -127,7 +169,10 @@ class MyApp extends StatelessWidget {
|
||||
initialRoute: '/',
|
||||
getPages: [
|
||||
GetPage(name: '/', page: () => SplashScreen()),
|
||||
GetPage(name: '/tripmonitor', page: () => const TripMonitor()),
|
||||
GetPage(name: '/shareApp', page: () => ShareAppPage()),
|
||||
GetPage(name: '/wallet', page: () => PassengerWallet()),
|
||||
GetPage(name: '/profile', page: () => PassengerProfilePage()),
|
||||
GetPage(name: '/contactSupport', page: () => ContactUsPage()),
|
||||
],
|
||||
// home: SplashScreen()
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user