diff --git a/android/app/src/main/res/mipmap-hdpi/launcher_icon.png b/android/app/src/main/res/mipmap-hdpi/launcher_icon.png index 33c4789..c61fd5c 100644 Binary files a/android/app/src/main/res/mipmap-hdpi/launcher_icon.png and b/android/app/src/main/res/mipmap-hdpi/launcher_icon.png differ diff --git a/android/app/src/main/res/mipmap-mdpi/launcher_icon.png b/android/app/src/main/res/mipmap-mdpi/launcher_icon.png index df1d31a..4583db1 100644 Binary files a/android/app/src/main/res/mipmap-mdpi/launcher_icon.png and b/android/app/src/main/res/mipmap-mdpi/launcher_icon.png differ diff --git a/android/app/src/main/res/mipmap-xhdpi/launcher_icon.png b/android/app/src/main/res/mipmap-xhdpi/launcher_icon.png index 69dfcd4..28201c2 100644 Binary files a/android/app/src/main/res/mipmap-xhdpi/launcher_icon.png and b/android/app/src/main/res/mipmap-xhdpi/launcher_icon.png differ diff --git a/android/app/src/main/res/mipmap-xxhdpi/launcher_icon.png b/android/app/src/main/res/mipmap-xxhdpi/launcher_icon.png index 73c82a3..53ce43b 100644 Binary files a/android/app/src/main/res/mipmap-xxhdpi/launcher_icon.png and b/android/app/src/main/res/mipmap-xxhdpi/launcher_icon.png differ diff --git a/android/app/src/main/res/mipmap-xxxhdpi/launcher_icon.png b/android/app/src/main/res/mipmap-xxxhdpi/launcher_icon.png index 60c6826..22e5e59 100644 Binary files a/android/app/src/main/res/mipmap-xxxhdpi/launcher_icon.png and b/android/app/src/main/res/mipmap-xxxhdpi/launcher_icon.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png new file mode 100644 index 0000000..838ac09 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png new file mode 100644 index 0000000..3f067e1 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png new file mode 100644 index 0000000..e2b7486 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png new file mode 100644 index 0000000..ff6568f Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png new file mode 100644 index 0000000..993879d Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png new file mode 100644 index 0000000..fa7fa9e Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png new file mode 100644 index 0000000..aacdaa6 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png new file mode 100644 index 0000000..e2b7486 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png new file mode 100644 index 0000000..7452af5 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png new file mode 100644 index 0000000..d1fa6b3 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png new file mode 100644 index 0000000..d77b46c Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png new file mode 100644 index 0000000..d45af18 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png new file mode 100644 index 0000000..62dfe63 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png new file mode 100644 index 0000000..12c52db Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png new file mode 100644 index 0000000..d1fa6b3 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png new file mode 100644 index 0000000..669e85c Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png new file mode 100644 index 0000000..c61fd5c Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png new file mode 100644 index 0000000..53ce43b Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png new file mode 100644 index 0000000..efa9b4a Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png new file mode 100644 index 0000000..97d08e5 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png new file mode 100644 index 0000000..d1787a7 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ diff --git a/lib/controller/functions/location_background_controller.dart b/lib/controller/functions/location_background_controller.dart index f00ca97..8fc3e32 100644 --- a/lib/controller/functions/location_background_controller.dart +++ b/lib/controller/functions/location_background_controller.dart @@ -1,20 +1,32 @@ import 'dart:async'; +import 'package:SEFER/constant/colors.dart'; +import 'package:SEFER/views/widgets/elevated_btn.dart'; import 'package:background_location/background_location.dart'; import 'package:get/get.dart'; import 'package:permission_handler/permission_handler.dart'; class LocationBackgroundController extends GetxController { @override - void onInit() { + Future onInit() async { super.onInit(); - requestLocationPermission(); - configureBackgroundLocation(); + await requestLocationPermission(); + await configureBackgroundLocation(); } Future requestLocationPermission() async { var status = await Permission.locationAlways.status; if (!status.isGranted) { - await Permission.locationAlways.request(); + Get.defaultDialog( + title: 'Grant Location'.tr, + middleText: + 'We use location to get accurate and nearest passengers for you' + .tr, + confirm: MyElevatedButton( + kolor: AppColor.greenColor, + title: 'Grant Location'.tr, + onPressed: () async { + await Permission.locationAlways.request(); + })); } } diff --git a/lib/controller/local/translations.dart b/lib/controller/local/translations.dart index 96236b3..361dfce 100644 --- a/lib/controller/local/translations.dart +++ b/lib/controller/local/translations.dart @@ -4,6 +4,9 @@ class MyTranslation extends Translations { @override Map> get keys => { "ar": { + 'Welcome to Sefer!': '', + 'Get to your destination quickly and easily.': '', + 'Enjoy a safe and comfortable ride.': '', "Choose Language": "اخْتَر اللُّغَة", "Login": "تَسْجِيل الدُّخُول", "Pay with Wallet": 'ادْفَع بِاسْتِخْدَام المَحْفَظَة', diff --git a/lib/main.dart b/lib/main.dart index db3b182..e1cfc63 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -74,7 +74,7 @@ void main() async { print(Get.deviceLocale!.countryCode); Stripe.publishableKey = AK.publishableKey; - Get.put(LocationBackgroundController()); + // Get.put(LocationBackgroundController()); if (Platform.isAndroid || Platform.isIOS) { await Firebase.initializeApp( @@ -146,11 +146,11 @@ class MyApp extends StatelessWidget { key: UniqueKey(), // routes: {'/':const HomePage()}, // home: LoginCaptin()); - getPages: [ - GetPage(name: '/', page: () => SplashScreen()), - GetPage( - name: '/OrderRequestPage/:id', page: () => OrderRequestPage()), - ], + // getPages: [ + // GetPage(name: '/', page: () => SplashScreen()), + // GetPage( + // name: '/OrderRequestPage/:id', page: () => OrderRequestPage()), + // ], initialRoute: '/', home: SplashScreen()); } diff --git a/lib/splash_screen_page.dart b/lib/splash_screen_page.dart index 68cdf2a..96762a8 100644 --- a/lib/splash_screen_page.dart +++ b/lib/splash_screen_page.dart @@ -17,7 +17,7 @@ class SplashScreen extends StatelessWidget { Widget build(BuildContext context) { return Scaffold( backgroundColor: - AppColor.primaryColor, // Set your desired background color + AppColor.secondaryColor, // Set your desired background color body: Center( child: Column( mainAxisAlignment: MainAxisAlignment.center, @@ -32,12 +32,19 @@ class SplashScreen extends StatelessWidget { splashScreenController.animationController.value < 0.5 ? splashScreenController.zoomInAnimation.value : splashScreenController.zoomOutAnimation.value, - child: Image.asset('assets/images/logo.png'), + child: Image.asset( + 'assets/images/logo.png', + width: Get.width * .3, + height: Get.width * .3, + ), ); }, ); }, ), + const SizedBox( + height: 30, + ), AnimatedTextKit(animatedTexts: [ TypewriterAnimatedText( 'Welcome to ${AppInformation.appName}', diff --git a/lib/views/auth/captin/login_captin.dart b/lib/views/auth/captin/login_captin.dart index 0b75787..d9cf547 100644 --- a/lib/views/auth/captin/login_captin.dart +++ b/lib/views/auth/captin/login_captin.dart @@ -9,22 +9,22 @@ import '../../../constant/colors.dart'; import '../../../constant/info.dart'; import '../../../constant/style.dart'; import '../../../controller/auth/captin/login_captin_controller.dart'; -import '../../../controller/auth/login_controller.dart'; import '../../../main.dart'; -import '../../home/profile/passenger_profile_page.dart'; import '../../widgets/elevated_btn.dart'; import '../../widgets/my_scafold.dart'; import '../../widgets/mycircular.dart'; +import '../country_widget.dart'; import 'register_captin.dart'; class LoginCaptin extends StatelessWidget { - final controller = Get.put(LoginCaptinController()); + // final controller = Get.put(LoginCaptinController()); LoginCaptin({super.key}); @override Widget build(BuildContext context) { - // Get.put(LoginCaptinController()); + Get.put(LoginCaptinController()); + // Get.put(LocationBackgroundController()); return GetBuilder( builder: (controller) => MyScafolld( title: 'Login Driver'.tr, @@ -313,36 +313,40 @@ class LoginCaptin extends StatelessWidget { } locationPermissionDialog() { - return Padding( - padding: const EdgeInsets.all(16), - child: Container( - height: Get.height * .4, - decoration: AppStyle.boxDecoration1, - child: Padding( - padding: const EdgeInsets.all(20.0), - child: Center( - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.spaceAround, - children: [ - Text( - 'We use location to get accurate and nearest passengers for you' - .tr, - textAlign: TextAlign.center, - style: AppStyle.title, + return GetBuilder(builder: (controller) { + return box.read(BoxName.locationPermission) != 'true' + ? Padding( + padding: const EdgeInsets.all(16), + child: Container( + height: Get.height * .4, + decoration: AppStyle.boxDecoration1, + child: Padding( + padding: const EdgeInsets.all(20.0), + child: Center( + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + Text( + 'We use location to get accurate and nearest passengers for you' + .tr, + textAlign: TextAlign.center, + style: AppStyle.title, + ), + MyElevatedButton( + title: 'Grant Location'.tr, + onPressed: () async { + await controller.getLocationPermission(); + }, + kolor: AppColor.greenColor, + ) + ], + ), + ), ), - MyElevatedButton( - title: 'Grant Location'.tr, - onPressed: () async { - await controller.getLocationPermission(); - }, - kolor: AppColor.greenColor, - ) - ], - ), - ), - ), - ), - ); + ), + ) + : const SizedBox(); + }); } } diff --git a/lib/views/auth/country_widget.dart b/lib/views/auth/country_widget.dart new file mode 100644 index 0000000..8e20db7 --- /dev/null +++ b/lib/views/auth/country_widget.dart @@ -0,0 +1,185 @@ +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:get/get.dart'; + +import '../../constant/box_name.dart'; +import '../../constant/colors.dart'; +import '../../constant/style.dart'; +import '../../controller/auth/captin/login_captin_controller.dart'; +import '../../controller/profile/profile_controller.dart'; +import '../../main.dart'; +import '../widgets/elevated_btn.dart'; +import 'captin/login_captin.dart'; + +class CountryPicker extends StatelessWidget { + final ProfileController controller = Get.put(ProfileController()); + + final List countryOptions = [ + 'Jordan', + 'USA', + 'Egypt', + 'Turkey', + 'Saudi Arabia', + 'Qatar', + 'Bahrain', + 'Kuwait', + ]; + + CountryPicker({Key? key}) : super(key: key); + + @override + Widget build(BuildContext context) { + return GetBuilder(builder: (controller) { + return Padding( + padding: const EdgeInsets.all(20), + child: ListView( + children: [ + const SizedBox( + height: 20, + ), + Text( + "Select Your Country".tr, + style: AppStyle.headTitle2, + textAlign: TextAlign.center, + ), + // const SizedBox( + // height: 20, + // ), + Padding( + padding: const EdgeInsets.all(10), + child: Text( + "To ensure you receive the most accurate information for your location, please select your country below. This will help tailor the app experience and content to your country." + .tr, + style: AppStyle.title, + textAlign: TextAlign.center, + ), + ), + SizedBox( + height: 200, + child: CupertinoPicker( + itemExtent: 32, + onSelectedItemChanged: (int index) { + controller.setCountry(countryOptions[index]); + box.write(BoxName.countryCode, + countryOptions[index]); // Save in English + }, + children: List.generate( + countryOptions.length, + (index) => Center( + child: Text( + countryOptions[index] + .tr, // Display translated if not English + style: AppStyle.title, + ), + ), + ), + ), + ), + + MyElevatedButton( + title: 'Select Country'.tr, // Use translated text for button + onPressed: () { + Get.find().saveCountryCode(controller + .selectedCountry + .toString()); // No conversion needed + box.write( + BoxName.countryCode, // + controller.selectedCountry); // Already saved in English + Get.snackbar(controller.selectedCountry.toString().tr, ''); + Get.off(LoginCaptin()); + }, + ) + ], + ), + ); + }); + } +} + +class CountryPickerFromSetting extends StatelessWidget { + final ProfileController controller = Get.put(ProfileController()); + final LoginCaptinController loginController = + Get.put(LoginCaptinController()); + + final List countryOptions = [ + 'Jordan', + 'USA', + 'Egypt', + 'Turkey', + 'Saudi Arabia', + 'Qatar', + 'Bahrain', + 'Kuwait', + ]; + + CountryPickerFromSetting({Key? key}) : super(key: key); + + @override + Widget build(BuildContext context) { + return GetBuilder(builder: (controller) { + return Padding( + padding: const EdgeInsets.all(20.0), + child: ListView( + children: [ + const SizedBox( + height: 20, + ), + Text( + "Select Your Country".tr, + style: AppStyle.headTitle2, + textAlign: TextAlign.center, + ), + // const SizedBox( + // height: 20, + // ), + Padding( + padding: const EdgeInsets.all(10), + child: Text( + "To ensure you receive the most accurate information for your location, please select your country below. This will help tailor the app experience and content to your country." + .tr, + style: AppStyle.title, + textAlign: TextAlign.center, + ), + ), + SizedBox( + height: 200, + child: CupertinoPicker( + itemExtent: 32, + onSelectedItemChanged: (int index) { + controller.setCountry(countryOptions[index]); + box.write(BoxName.countryCode, + countryOptions[index]); // Save in English + }, + children: List.generate( + countryOptions.length, + (index) => Center( + child: Text( + countryOptions[index] + .tr, // Display translated if not English + style: AppStyle.title, + ), + ), + ), + ), + ), + + MyElevatedButton( + title: 'Select Country'.tr, // Use translated text for button + onPressed: () async { + loginController.saveCountryCode(controller.selectedCountry + .toString()); // No conversion needed + box.write( + BoxName.countryCode, // + controller.selectedCountry); // Already saved in English + Get.snackbar(controller.selectedCountry.toString().tr, '', + backgroundColor: AppColor.greenColor); + // Get.back();// + // Get.back(); + }, + ) + ], + ), + ); + }); + } +} diff --git a/lib/views/auth/login_page.dart b/lib/views/auth/login_page.dart index 2c3e51f..3626df5 100644 --- a/lib/views/auth/login_page.dart +++ b/lib/views/auth/login_page.dart @@ -10,12 +10,11 @@ import 'package:SEFER/main.dart'; import 'package:SEFER/views/auth/captin/login_captin.dart'; import 'package:SEFER/views/widgets/elevated_btn.dart'; import 'package:SEFER/views/widgets/my_scafold.dart'; -import 'package:SEFER/views/widgets/my_textField.dart'; import '../../constant/info.dart'; import '../../controller/auth/login_controller.dart'; -import '../home/profile/passenger_profile_page.dart'; import '../widgets/mycircular.dart'; +import 'country_widget.dart'; import 'register_page.dart'; class LoginPage extends StatelessWidget { diff --git a/lib/views/home/Captin/settings_captain.dart b/lib/views/home/Captin/settings_captain.dart index 25b8a50..3962067 100644 --- a/lib/views/home/Captin/settings_captain.dart +++ b/lib/views/home/Captin/settings_captain.dart @@ -1,6 +1,5 @@ import 'package:SEFER/constant/colors.dart'; import 'package:SEFER/controller/profile/setting_controller.dart'; -import 'package:SEFER/views/home/profile/passenger_profile_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_font_icons/flutter_font_icons.dart'; @@ -9,6 +8,8 @@ import 'package:SEFER/constant/style.dart'; import 'package:SEFER/views/lang/languages.dart'; import 'package:SEFER/views/widgets/my_scafold.dart'; +import '../../auth/country_widget.dart'; + class SettingsCaptain extends StatelessWidget { const SettingsCaptain({super.key}); diff --git a/lib/views/home/profile/passenger_profile_page.dart b/lib/views/home/profile/passenger_profile_page.dart index 5297bb3..59d5ad1 100644 --- a/lib/views/home/profile/passenger_profile_page.dart +++ b/lib/views/home/profile/passenger_profile_page.dart @@ -303,176 +303,3 @@ class EducationDegreePicker extends StatelessWidget { ); } } - -class CountryPicker extends StatelessWidget { - final ProfileController controller = Get.put(ProfileController()); - - final List countryOptions = [ - 'Jordan', - 'USA', - 'Egypt', - 'Turkey', - 'Saudi Arabia', - 'Qatar', - 'Bahrain', - 'Kuwait', - ]; - - CountryPicker({Key? key}) : super(key: key); - - @override - Widget build(BuildContext context) { - return GetBuilder(builder: (controller) { - return Padding( - padding: const EdgeInsets.all(20), - child: ListView( - children: [ - const SizedBox( - height: 20, - ), - Text( - "Select Your Country".tr, - style: AppStyle.headTitle2, - textAlign: TextAlign.center, - ), - // const SizedBox( - // height: 20, - // ), - Padding( - padding: const EdgeInsets.all(10), - child: Text( - "To ensure you receive the most accurate information for your location, please select your country below. This will help tailor the app experience and content to your country." - .tr, - style: AppStyle.title, - textAlign: TextAlign.center, - ), - ), - SizedBox( - height: 200, - child: CupertinoPicker( - itemExtent: 32, - onSelectedItemChanged: (int index) { - controller.setCountry(countryOptions[index]); - box.write(BoxName.countryCode, - countryOptions[index]); // Save in English - }, - children: List.generate( - countryOptions.length, - (index) => Center( - child: Text( - countryOptions[index] - .tr, // Display translated if not English - style: AppStyle.title, - ), - ), - ), - ), - ), - - MyElevatedButton( - title: 'Select Country'.tr, // Use translated text for button - onPressed: () { - Get.find().saveCountryCode(controller - .selectedCountry - .toString()); // No conversion needed - box.write( - BoxName.countryCode, // - controller.selectedCountry); // Already saved in English - Get.snackbar(controller.selectedCountry.toString().tr, ''); - Get.off(LoginCaptin()); - }, - ) - ], - ), - ); - }); - } -} - -class CountryPickerFromSetting extends StatelessWidget { - final ProfileController controller = Get.put(ProfileController()); - final LoginCaptinController loginController = - Get.put(LoginCaptinController()); - - final List countryOptions = [ - 'Jordan', - 'USA', - 'Egypt', - 'Turkey', - 'Saudi Arabia', - 'Qatar', - 'Bahrain', - 'Kuwait', - ]; - - CountryPickerFromSetting({Key? key}) : super(key: key); - - @override - Widget build(BuildContext context) { - return GetBuilder(builder: (controller) { - return Padding( - padding: const EdgeInsets.all(20.0), - child: ListView( - children: [ - const SizedBox( - height: 20, - ), - Text( - "Select Your Country".tr, - style: AppStyle.headTitle2, - textAlign: TextAlign.center, - ), - // const SizedBox( - // height: 20, - // ), - Padding( - padding: const EdgeInsets.all(10), - child: Text( - "To ensure you receive the most accurate information for your location, please select your country below. This will help tailor the app experience and content to your country." - .tr, - style: AppStyle.title, - textAlign: TextAlign.center, - ), - ), - SizedBox( - height: 200, - child: CupertinoPicker( - itemExtent: 32, - onSelectedItemChanged: (int index) { - controller.setCountry(countryOptions[index]); - box.write(BoxName.countryCode, - countryOptions[index]); // Save in English - }, - children: List.generate( - countryOptions.length, - (index) => Center( - child: Text( - countryOptions[index] - .tr, // Display translated if not English - style: AppStyle.title, - ), - ), - ), - ), - ), - - MyElevatedButton( - title: 'Select Country'.tr, // Use translated text for button - onPressed: () async { - loginController.saveCountryCode(controller.selectedCountry - .toString()); // No conversion needed - box.write( - BoxName.countryCode, // - controller.selectedCountry); // Already saved in English - Get.snackbar(controller.selectedCountry.toString().tr, '', - backgroundColor: AppColor.greenColor); - // Get.back();// - // Get.back(); - }, - ) - ], - ), - ); - }); - } -} diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png index e57c547..838ac09 100644 Binary files a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png and b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png index 45f7800..10f0c69 100644 Binary files a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png and b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png index 015f391..68b9077 100644 Binary files a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png and b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png index 1ddfe47..93e66b2 100644 Binary files a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png and b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png index f7f777c..8ab7051 100644 Binary files a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png and b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png index e30496e..adcbfe0 100644 Binary files a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png and b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png index 8bb3db8..a38a698 100644 Binary files a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png and b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png differ diff --git a/web/favicon.png b/web/favicon.png index 015f391..68b9077 100644 Binary files a/web/favicon.png and b/web/favicon.png differ diff --git a/web/icons/Icon-192.png b/web/icons/Icon-192.png index 60c6826..22e5e59 100644 Binary files a/web/icons/Icon-192.png and b/web/icons/Icon-192.png differ diff --git a/web/icons/Icon-512.png b/web/icons/Icon-512.png index e30496e..adcbfe0 100644 Binary files a/web/icons/Icon-512.png and b/web/icons/Icon-512.png differ diff --git a/web/icons/Icon-maskable-192.png b/web/icons/Icon-maskable-192.png index 60c6826..22e5e59 100644 Binary files a/web/icons/Icon-maskable-192.png and b/web/icons/Icon-maskable-192.png differ diff --git a/web/icons/Icon-maskable-512.png b/web/icons/Icon-maskable-512.png index e30496e..adcbfe0 100644 Binary files a/web/icons/Icon-maskable-512.png and b/web/icons/Icon-maskable-512.png differ diff --git a/windows/runner/resources/app_icon.ico b/windows/runner/resources/app_icon.ico index 1f96742..8d356c2 100644 Binary files a/windows/runner/resources/app_icon.ico and b/windows/runner/resources/app_icon.ico differ