diff --git a/android/app/.cxx/Debug/29y7472m/arm64-v8a/configure_fingerprint.bin b/android/app/.cxx/Debug/29y7472m/arm64-v8a/configure_fingerprint.bin index bc15e9b8..fcf06373 100644 --- a/android/app/.cxx/Debug/29y7472m/arm64-v8a/configure_fingerprint.bin +++ b/android/app/.cxx/Debug/29y7472m/arm64-v8a/configure_fingerprint.bin @@ -2,27 +2,27 @@ C/C++ Structured Logo m kC:\Flutter Applications\Git_New\FCSC\android\app\.cxx\Debug\29y7472m\arm64-v8a\additional_project_files.txtC A -?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  ݰ2  2l +?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  ̢2  2l j -hC:\Flutter Applications\Git_New\FCSC\android\app\.cxx\Debug\29y7472m\arm64-v8a\android_gradle_build.json  ݰ2 2q +hC:\Flutter Applications\Git_New\FCSC\android\app\.cxx\Debug\29y7472m\arm64-v8a\android_gradle_build.json  ͢2 2q o -mC:\Flutter Applications\Git_New\FCSC\android\app\.cxx\Debug\29y7472m\arm64-v8a\android_gradle_build_mini.json  ݰ2 2^ +mC:\Flutter Applications\Git_New\FCSC\android\app\.cxx\Debug\29y7472m\arm64-v8a\android_gradle_build_mini.json  ͢2 2^ \ -ZC:\Flutter Applications\Git_New\FCSC\android\app\.cxx\Debug\29y7472m\arm64-v8a\build.ninja  ݰ2 2b +ZC:\Flutter Applications\Git_New\FCSC\android\app\.cxx\Debug\29y7472m\arm64-v8a\build.ninja  ͢2 2b ` -^C:\Flutter Applications\Git_New\FCSC\android\app\.cxx\Debug\29y7472m\arm64-v8a\build.ninja.txt  ݰ2g +^C:\Flutter Applications\Git_New\FCSC\android\app\.cxx\Debug\29y7472m\arm64-v8a\build.ninja.txt  ͢2g e -cC:\Flutter Applications\Git_New\FCSC\android\app\.cxx\Debug\29y7472m\arm64-v8a\build_file_index.txt  ݰ2 K 2h +cC:\Flutter Applications\Git_New\FCSC\android\app\.cxx\Debug\29y7472m\arm64-v8a\build_file_index.txt  ͢2 K 2h f -dC:\Flutter Applications\Git_New\FCSC\android\app\.cxx\Debug\29y7472m\arm64-v8a\compile_commands.json  ݰ2l +dC:\Flutter Applications\Git_New\FCSC\android\app\.cxx\Debug\29y7472m\arm64-v8a\compile_commands.json  ͢2l j -hC:\Flutter Applications\Git_New\FCSC\android\app\.cxx\Debug\29y7472m\arm64-v8a\compile_commands.json.bin  ݰ2 r +hC:\Flutter Applications\Git_New\FCSC\android\app\.cxx\Debug\29y7472m\arm64-v8a\compile_commands.json.bin  ͢2 r p -nC:\Flutter Applications\Git_New\FCSC\android\app\.cxx\Debug\29y7472m\arm64-v8a\metadata_generation_command.txt  ݰ2 +nC:\Flutter Applications\Git_New\FCSC\android\app\.cxx\Debug\29y7472m\arm64-v8a\metadata_generation_command.txt  ͢2  2e c -aC:\Flutter Applications\Git_New\FCSC\android\app\.cxx\Debug\29y7472m\arm64-v8a\prefab_config.json  ݰ2  ( 2j +aC:\Flutter Applications\Git_New\FCSC\android\app\.cxx\Debug\29y7472m\arm64-v8a\prefab_config.json  ͢2  ( 2j h -fC:\Flutter Applications\Git_New\FCSC\android\app\.cxx\Debug\29y7472m\arm64-v8a\symbol_folder_index.txt  ݰ2  ] 2O +fC:\Flutter Applications\Git_New\FCSC\android\app\.cxx\Debug\29y7472m\arm64-v8a\symbol_folder_index.txt  ͢2  ] 2O M -KC:\src\flutter\packages\flutter_tools\gradle\src\main\groovy\CMakeLists.txt  ݰ2  2 \ No newline at end of file +KC:\src\flutter\packages\flutter_tools\gradle\src\main\groovy\CMakeLists.txt  ͢2  2 \ No newline at end of file diff --git a/android/app/.cxx/Debug/29y7472m/armeabi-v7a/configure_fingerprint.bin b/android/app/.cxx/Debug/29y7472m/armeabi-v7a/configure_fingerprint.bin index 2eee5277..ff41ca69 100644 --- a/android/app/.cxx/Debug/29y7472m/armeabi-v7a/configure_fingerprint.bin +++ b/android/app/.cxx/Debug/29y7472m/armeabi-v7a/configure_fingerprint.bin @@ -2,27 +2,27 @@ C/C++ Structured Logq o mC:\Flutter Applications\Git_New\FCSC\android\app\.cxx\Debug\29y7472m\armeabi-v7a\additional_project_files.txtC A -?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  ݰ2  Ǡ2n +?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  2  Ǡ2n l -jC:\Flutter Applications\Git_New\FCSC\android\app\.cxx\Debug\29y7472m\armeabi-v7a\android_gradle_build.json  ݰ2 Ǡ2s +jC:\Flutter Applications\Git_New\FCSC\android\app\.cxx\Debug\29y7472m\armeabi-v7a\android_gradle_build.json  2 Ǡ2s q -oC:\Flutter Applications\Git_New\FCSC\android\app\.cxx\Debug\29y7472m\armeabi-v7a\android_gradle_build_mini.json  ݰ2 Ǡ2` +oC:\Flutter Applications\Git_New\FCSC\android\app\.cxx\Debug\29y7472m\armeabi-v7a\android_gradle_build_mini.json  2 Ǡ2` ^ -\C:\Flutter Applications\Git_New\FCSC\android\app\.cxx\Debug\29y7472m\armeabi-v7a\build.ninja  ݰ2 Š2d +\C:\Flutter Applications\Git_New\FCSC\android\app\.cxx\Debug\29y7472m\armeabi-v7a\build.ninja  2 Š2d b -`C:\Flutter Applications\Git_New\FCSC\android\app\.cxx\Debug\29y7472m\armeabi-v7a\build.ninja.txt  ݰ2i +`C:\Flutter Applications\Git_New\FCSC\android\app\.cxx\Debug\29y7472m\armeabi-v7a\build.ninja.txt  2i g -eC:\Flutter Applications\Git_New\FCSC\android\app\.cxx\Debug\29y7472m\armeabi-v7a\build_file_index.txt  ݰ2 K Ǡ2j +eC:\Flutter Applications\Git_New\FCSC\android\app\.cxx\Debug\29y7472m\armeabi-v7a\build_file_index.txt  2 K Ǡ2j h -fC:\Flutter Applications\Git_New\FCSC\android\app\.cxx\Debug\29y7472m\armeabi-v7a\compile_commands.json  ݰ2n +fC:\Flutter Applications\Git_New\FCSC\android\app\.cxx\Debug\29y7472m\armeabi-v7a\compile_commands.json  2n l -jC:\Flutter Applications\Git_New\FCSC\android\app\.cxx\Debug\29y7472m\armeabi-v7a\compile_commands.json.bin  ݰ2 t +jC:\Flutter Applications\Git_New\FCSC\android\app\.cxx\Debug\29y7472m\armeabi-v7a\compile_commands.json.bin  2 t r -pC:\Flutter Applications\Git_New\FCSC\android\app\.cxx\Debug\29y7472m\armeabi-v7a\metadata_generation_command.txt  ݰ2 +pC:\Flutter Applications\Git_New\FCSC\android\app\.cxx\Debug\29y7472m\armeabi-v7a\metadata_generation_command.txt  2  Ǡ2g e -cC:\Flutter Applications\Git_New\FCSC\android\app\.cxx\Debug\29y7472m\armeabi-v7a\prefab_config.json  ݰ2  ( Ǡ2l +cC:\Flutter Applications\Git_New\FCSC\android\app\.cxx\Debug\29y7472m\armeabi-v7a\prefab_config.json  2  ( Ǡ2l j -hC:\Flutter Applications\Git_New\FCSC\android\app\.cxx\Debug\29y7472m\armeabi-v7a\symbol_folder_index.txt  ݰ2  _ Ǡ2O +hC:\Flutter Applications\Git_New\FCSC\android\app\.cxx\Debug\29y7472m\armeabi-v7a\symbol_folder_index.txt  2  _ Ǡ2O M -KC:\src\flutter\packages\flutter_tools\gradle\src\main\groovy\CMakeLists.txt  ݰ2  2 \ No newline at end of file +KC:\src\flutter\packages\flutter_tools\gradle\src\main\groovy\CMakeLists.txt  2  2 \ No newline at end of file diff --git a/android/app/.cxx/Debug/29y7472m/x86/configure_fingerprint.bin b/android/app/.cxx/Debug/29y7472m/x86/configure_fingerprint.bin index 12db9828..4d9777d9 100644 --- a/android/app/.cxx/Debug/29y7472m/x86/configure_fingerprint.bin +++ b/android/app/.cxx/Debug/29y7472m/x86/configure_fingerprint.bin @@ -2,27 +2,27 @@ C/C++ Structured Logi g eC:\Flutter Applications\Git_New\FCSC\android\app\.cxx\Debug\29y7472m\x86\additional_project_files.txtC A -?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  ݰ2  2f +?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  2  2f d -bC:\Flutter Applications\Git_New\FCSC\android\app\.cxx\Debug\29y7472m\x86\android_gradle_build.json  ݰ2 2k +bC:\Flutter Applications\Git_New\FCSC\android\app\.cxx\Debug\29y7472m\x86\android_gradle_build.json  2 2k i -gC:\Flutter Applications\Git_New\FCSC\android\app\.cxx\Debug\29y7472m\x86\android_gradle_build_mini.json  ݰ2 2X +gC:\Flutter Applications\Git_New\FCSC\android\app\.cxx\Debug\29y7472m\x86\android_gradle_build_mini.json  2 2X V -TC:\Flutter Applications\Git_New\FCSC\android\app\.cxx\Debug\29y7472m\x86\build.ninja  ݰ2 2\ +TC:\Flutter Applications\Git_New\FCSC\android\app\.cxx\Debug\29y7472m\x86\build.ninja  2 2\ Z -XC:\Flutter Applications\Git_New\FCSC\android\app\.cxx\Debug\29y7472m\x86\build.ninja.txt  ݰ2a +XC:\Flutter Applications\Git_New\FCSC\android\app\.cxx\Debug\29y7472m\x86\build.ninja.txt  2a _ -]C:\Flutter Applications\Git_New\FCSC\android\app\.cxx\Debug\29y7472m\x86\build_file_index.txt  ݰ2 K 2b +]C:\Flutter Applications\Git_New\FCSC\android\app\.cxx\Debug\29y7472m\x86\build_file_index.txt  2 K 2b ` -^C:\Flutter Applications\Git_New\FCSC\android\app\.cxx\Debug\29y7472m\x86\compile_commands.json  ݰ2f +^C:\Flutter Applications\Git_New\FCSC\android\app\.cxx\Debug\29y7472m\x86\compile_commands.json  2f d -bC:\Flutter Applications\Git_New\FCSC\android\app\.cxx\Debug\29y7472m\x86\compile_commands.json.bin  ݰ2 l +bC:\Flutter Applications\Git_New\FCSC\android\app\.cxx\Debug\29y7472m\x86\compile_commands.json.bin  2 l j -hC:\Flutter Applications\Git_New\FCSC\android\app\.cxx\Debug\29y7472m\x86\metadata_generation_command.txt  ݰ2 +hC:\Flutter Applications\Git_New\FCSC\android\app\.cxx\Debug\29y7472m\x86\metadata_generation_command.txt  2  2_ ] -[C:\Flutter Applications\Git_New\FCSC\android\app\.cxx\Debug\29y7472m\x86\prefab_config.json  ݰ2  ( 2d +[C:\Flutter Applications\Git_New\FCSC\android\app\.cxx\Debug\29y7472m\x86\prefab_config.json  2  ( 2d b -`C:\Flutter Applications\Git_New\FCSC\android\app\.cxx\Debug\29y7472m\x86\symbol_folder_index.txt  ݰ2  W 2O +`C:\Flutter Applications\Git_New\FCSC\android\app\.cxx\Debug\29y7472m\x86\symbol_folder_index.txt  2  W 2O M -KC:\src\flutter\packages\flutter_tools\gradle\src\main\groovy\CMakeLists.txt  ݰ2  2 \ No newline at end of file +KC:\src\flutter\packages\flutter_tools\gradle\src\main\groovy\CMakeLists.txt  2  2 \ No newline at end of file diff --git a/android/app/.cxx/Debug/29y7472m/x86_64/configure_fingerprint.bin b/android/app/.cxx/Debug/29y7472m/x86_64/configure_fingerprint.bin index 1972a437..b3ed8ace 100644 --- a/android/app/.cxx/Debug/29y7472m/x86_64/configure_fingerprint.bin +++ b/android/app/.cxx/Debug/29y7472m/x86_64/configure_fingerprint.bin @@ -2,27 +2,27 @@ C/C++ Structured Logl j hC:\Flutter Applications\Git_New\FCSC\android\app\.cxx\Debug\29y7472m\x86_64\additional_project_files.txtC A -?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  ݰ2  2i +?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  2  2i g -eC:\Flutter Applications\Git_New\FCSC\android\app\.cxx\Debug\29y7472m\x86_64\android_gradle_build.json  ݰ2 2n +eC:\Flutter Applications\Git_New\FCSC\android\app\.cxx\Debug\29y7472m\x86_64\android_gradle_build.json  2 2n l -jC:\Flutter Applications\Git_New\FCSC\android\app\.cxx\Debug\29y7472m\x86_64\android_gradle_build_mini.json  ݰ2 2[ +jC:\Flutter Applications\Git_New\FCSC\android\app\.cxx\Debug\29y7472m\x86_64\android_gradle_build_mini.json  2 2[ Y -WC:\Flutter Applications\Git_New\FCSC\android\app\.cxx\Debug\29y7472m\x86_64\build.ninja  ݰ2 2_ +WC:\Flutter Applications\Git_New\FCSC\android\app\.cxx\Debug\29y7472m\x86_64\build.ninja  2 2_ ] -[C:\Flutter Applications\Git_New\FCSC\android\app\.cxx\Debug\29y7472m\x86_64\build.ninja.txt  ݰ2d +[C:\Flutter Applications\Git_New\FCSC\android\app\.cxx\Debug\29y7472m\x86_64\build.ninja.txt  2d b -`C:\Flutter Applications\Git_New\FCSC\android\app\.cxx\Debug\29y7472m\x86_64\build_file_index.txt  ݰ2 K 2e +`C:\Flutter Applications\Git_New\FCSC\android\app\.cxx\Debug\29y7472m\x86_64\build_file_index.txt  2 K 2e c -aC:\Flutter Applications\Git_New\FCSC\android\app\.cxx\Debug\29y7472m\x86_64\compile_commands.json  ݰ2i +aC:\Flutter Applications\Git_New\FCSC\android\app\.cxx\Debug\29y7472m\x86_64\compile_commands.json  2i g -eC:\Flutter Applications\Git_New\FCSC\android\app\.cxx\Debug\29y7472m\x86_64\compile_commands.json.bin  ݰ2 o +eC:\Flutter Applications\Git_New\FCSC\android\app\.cxx\Debug\29y7472m\x86_64\compile_commands.json.bin  2 o m -kC:\Flutter Applications\Git_New\FCSC\android\app\.cxx\Debug\29y7472m\x86_64\metadata_generation_command.txt  ݰ2 +kC:\Flutter Applications\Git_New\FCSC\android\app\.cxx\Debug\29y7472m\x86_64\metadata_generation_command.txt  2  2b ` -^C:\Flutter Applications\Git_New\FCSC\android\app\.cxx\Debug\29y7472m\x86_64\prefab_config.json  ݰ2  ( 2g +^C:\Flutter Applications\Git_New\FCSC\android\app\.cxx\Debug\29y7472m\x86_64\prefab_config.json  2  ( 2g e -cC:\Flutter Applications\Git_New\FCSC\android\app\.cxx\Debug\29y7472m\x86_64\symbol_folder_index.txt  ݰ2  Z 2O +cC:\Flutter Applications\Git_New\FCSC\android\app\.cxx\Debug\29y7472m\x86_64\symbol_folder_index.txt  2  Z 2O M -KC:\src\flutter\packages\flutter_tools\gradle\src\main\groovy\CMakeLists.txt  ݰ2  2 \ No newline at end of file +KC:\src\flutter\packages\flutter_tools\gradle\src\main\groovy\CMakeLists.txt  2  2 \ No newline at end of file diff --git a/assets/country-profile/president.png b/assets/country-profile/president.png new file mode 100644 index 00000000..b6ffd414 Binary files /dev/null and b/assets/country-profile/president.png differ diff --git a/assets/country-profile/vicePresident.png b/assets/country-profile/vicePresident.png new file mode 100644 index 00000000..27bfde5c Binary files /dev/null and b/assets/country-profile/vicePresident.png differ diff --git a/lib/presentation/Screens/Bottom Navigation Pages/Country_Profile/DetailedCountryProfilePage.dart b/lib/presentation/Screens/Bottom Navigation Pages/Country_Profile/DetailedCountryProfilePage.dart index 6e4e8bd3..2ac76d41 100644 --- a/lib/presentation/Screens/Bottom Navigation Pages/Country_Profile/DetailedCountryProfilePage.dart +++ b/lib/presentation/Screens/Bottom Navigation Pages/Country_Profile/DetailedCountryProfilePage.dart @@ -1,8 +1,10 @@ import 'dart:ui'; +import 'package:external_repos/external_repos.dart'; import 'package:flutter/material.dart'; import 'package:dotted_border/dotted_border.dart'; import 'package:uae_stat/infrastructure/services/img_asset_paths/icons/popup_asset_path.dart'; import 'package:uae_stat/presentation/routes/drawer_routes/custom_drawer_routes.dart'; +import 'package:uae_stat/domain/use_cases/language.dart'; class DetailedCountryProfilePage extends StatelessWidget { final String countryName; @@ -17,134 +19,157 @@ class DetailedCountryProfilePage extends StatelessWidget { @override Widget build(BuildContext context) { double width = MediaQuery.of(context).size.width; - - return BaseScaffold( - title: const Text('Country Profile'), - showBackButton: true, - body: Padding( - padding: const EdgeInsets.all(16.0), - child: Column( - children: [ - // Country name and flag (Header Section) - Center( - child: Column( - children: [ - Text( - flag, - style: const TextStyle(fontSize: 48), - ), - const SizedBox(height: 8), - Text( - countryName.toUpperCase(), - style: const TextStyle( - fontSize: 22, - fontWeight: FontWeight.bold, + final country = ISOCountry.fromAlpha2(flag); + return Theme( + data: ThemeData( + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), + ), + child: BaseScaffold( + title: const Text('Country Profile'), + showBackButton: true, + body: Padding( + padding: const EdgeInsets.all(16.0), + child: Column( + children: [ + // Country name and flag (Header Section) + Center( + child: Column( + children: [ + Container( + padding: EdgeInsets.zero, // optional inner spacing + decoration: BoxDecoration( + shape: BoxShape.circle, + border: Border.all(color: Colors.white, width: 3), + boxShadow: [ + BoxShadow( + color: Colors.black.withValues(alpha:0.3), + spreadRadius: 2, + blurRadius: 6, + offset: Offset(0, 4), + ), + ], + ), + child: CircleAvatar( + radius: 20, + backgroundImage: AssetImage(country.flagImgPath), + ), ), - ), - ], + const SizedBox(height: 8), + Text( + countryName.toUpperCase(), + style: const TextStyle( + fontSize: 22, + fontWeight: FontWeight.bold, + ), + ), + ], + ), ), - ), - const SizedBox(height: 16), + const SizedBox(height: 16), - // Government Officials (Grid Section) - SizedBox( - height: 220, // Fixed height for the GridView to control its size - child: GridView.count( - crossAxisCount: 2, - shrinkWrap: true, - physics: const NeverScrollableScrollPhysics(), - mainAxisSpacing: 12, - crossAxisSpacing: 12, - childAspectRatio: 2.0, - children: const [ - _LeaderCard( - imagePath: 'assets/country-profile/alberto.png', - name: 'Alberto Fernández', - position: 'President', - ), - _LeaderCard( - imagePath: 'assets/country-profile/alberto.png', - name: 'Cristina Fernández de Kirchner', - position: 'Vice-President', - ), - _LeaderCard( - imagePath: 'assets/country-profile/alberto.png', - name: 'Agustin Rossi', - position: 'Chief of the Cabinet of Ministers', - ), - _LeaderCard( - imagePath: 'assets/country-profile/alberto.png', - name: 'Cecilia Moreau', - position: 'President of Chamber of Deputies', - ), - ], + // Government Officials (Grid Section) + SizedBox( + height: 220, // Fixed height for the GridView to control its size + child: GridView.count( + crossAxisCount: 2, + shrinkWrap: true, + physics: const NeverScrollableScrollPhysics(), + mainAxisSpacing: 10, + crossAxisSpacing: 4, + childAspectRatio: 2.0, + children: [ + _LeaderCard( + imagePath: 'assets/country-profile/president.png', + name: context.translate('Alberto Fernández','ألبرتو فرناندس'), + position: context.translate('President','الرئيس'), + ), + _LeaderCard( + imagePath: 'assets/country-profile/president.png', + name: context.translate('Cristina Fernández de Kirchner','كريستينا فرنانديز دي كيرشنر'), + position: context.translate('Vice-President','رئيس الجمهورية'), + ), + _LeaderCard( + imagePath: 'assets/country-profile/vicePresident.png', + name: context.translate('Agustin Rossi','أغوستين روسي'), + position: context.translate('Chief of the Cabinet of Ministers','رئيس مجلس الوزراء'), + ), + _LeaderCard( + imagePath: 'assets/country-profile/vicePresident.png', + name: context.translate('Cecilia Moreau','سيسيليا موريو'), + position: context.translate('President of Chamber of Deputies','رئيس غرفة النواب'), + ), + ], + ), ), - ), - const SizedBox(height: 12), // Further reduced spacing + const SizedBox(height: 12), // Further reduced spacing - // Category Buttons (Button Section) - Flexible( - fit: FlexFit.loose, // Allow the section to take only the space it needs - child: Column( - crossAxisAlignment: CrossAxisAlignment.stretch, - children: [ - Row( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - children: [ - Expanded( - child: _CategoryButton( - title: 'Demography', - overlayColor: const Color(0xE6AA947F), - backgroundImagePath: 'assets/country-profile/CategoryFile/Demo.png', - onTap: () => showCategoryPopup(context, 'Demography'), + // Category Buttons (Button Section) + Flexible( + fit: FlexFit.loose, // Allow the section to take only the space it needs + child: Column( + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + Expanded( + child: _CategoryButton( + title: context.translate('Demography','التركيبة السكانية'), + overlayColor: const Color(0xE6AA947F), + backgroundImagePath: 'assets/country-profile/CategoryFile/Demo.png', + onTap: () => showCategoryPopup(context, 'Demography'), + ), ), - ), - const SizedBox(width: 12), - Expanded( - child: _CategoryButton( - title: 'GDP', - overlayColor: const Color(0xFFAEC6CF), - backgroundImagePath: 'assets/country-profile/CategoryFile/GDP.png', - onTap: () => showCategoryPopup(context, 'GDP'), + const SizedBox(width: 12), + Expanded( + child: _CategoryButton( + title: context.translate('GDP','الناتج المحلي الإجمالي'), + overlayColor: const Color(0xFFAEC6CF), + backgroundImagePath: 'assets/country-profile/CategoryFile/GDP.png', + onTap: () => showCategoryPopup(context, 'GDP'), + ), ), - ), - ], - ), - const SizedBox(height: 12), - Row( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - children: [ - Expanded( - child: _CategoryButton( - title: 'FDI', - overlayColor: const Color(0xD8C39898), - backgroundImagePath: 'assets/country-profile/CategoryFile/FDI.png', - onTap: () => showCategoryPopup(context, 'FDI'), + ], + ), + const SizedBox(height: 12), + Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + Expanded( + child: _CategoryButton( + title: context.translate('FDI','الاستثمار الأجنبي المباشر'), + overlayColor: const Color(0xD8C39898), + backgroundImagePath: 'assets/country-profile/CategoryFile/FDI.png', + onTap: () => showCategoryPopup(context, 'FDI'), + ), ), - ), - const SizedBox(width: 12), - Expanded( - child: _CategoryButton( - title: 'Trade', - overlayColor: const Color(0xD8B0C5A4), - backgroundImagePath: 'assets/country-profile/CategoryFile/Trade.png', - onTap: () => showCategoryPopup(context, 'Trade'), + const SizedBox(width: 12), + Expanded( + child: _CategoryButton( + title: context.translate('Trade','التجارة'), + overlayColor: const Color(0xD8B0C5A4), + backgroundImagePath: 'assets/country-profile/CategoryFile/Trade.png', + onTap: () => showCategoryPopup(context, 'Trade'), + ), ), - ), - ], - ), - const SizedBox(height: 12), - // Full-width button - _CategoryButton( - title: 'Bilateral Trade', - overlayColor: const Color(0xB29CAFAB), - backgroundImagePath: 'assets/country-profile/CategoryFile/BilateralTrade.png', - onTap: () => showCategoryPopup(context, 'Bilateral Trade'), - ), - ], + ], + ), + const SizedBox(height: 12), + // Full-width button + _CategoryButton( + title: context.translate('Bilateral Trade','التجارة الثنائية'), + overlayColor: const Color(0xB29CAFAB), + backgroundImagePath: 'assets/country-profile/CategoryFile/BilateralTrade.png', + onTap: () => showCategoryPopup(context, 'Bilateral Trade'), + ), + ], + ), ), - ), - ], + ], + ), ), ), ); @@ -308,12 +333,14 @@ class CategoryPopupContent extends StatelessWidget { children: [ const SizedBox(height: 16), _DemographyItem( + context:context, icon: PopupAssetPath.capital, - title: 'Capital City', - value: 'Buenos Aires', + title: context.translate('Capital City','العاصمة'), + value: context.translate('Buenos Aires','بوينس آيرس'), ), lineBorder, _DemographyItem( + context:context, icon: PopupAssetPath.area, title: 'Surface Area', value: '2,780,400 sq. km', @@ -321,30 +348,30 @@ class CategoryPopupContent extends StatelessWidget { lineBorder, _DemographyStatItem( icon: PopupAssetPath.population, - title: '2021 Population', + title: context.translate('2021 Population','السكان 2021'), value: '45.81 M', suffix: '32', arrow:Icons.arrow_upward, - suffixText: 'Rank', + suffixText: context.translate('Rank','رتبة'), ), lineBorder, _DemographyStatItem( icon: PopupAssetPath.male, - title: '2021 Male Population', + title: context.translate('2021 Male Population','السكان الذكور 2021 '), value: '22.35 M', suffix: '0.98%', arrow:Icons.arrow_upward, - suffixText: 'Growth Rate', + suffixText: context.translate('Growth Rate','معدل النمو'), valueColor: Color(0xFF00205B), ), lineBorder, _DemographyStatItem( icon:PopupAssetPath.female, - title: '2021 Female Population', + title: context.translate('2021 Female Population','السكان الإناث 2021'), value: '23.46 M', suffix: '0.93%', arrow:Icons.arrow_upward, - suffixText: 'Growth Rate', + suffixText: context.translate('Growth Rate','معدل النمو'), valueColor: Color(0xFF751398), ), const SizedBox(height: 16), @@ -357,8 +384,9 @@ class CategoryPopupContent extends StatelessWidget { children: [ const SizedBox(height: 16), _GDPMetricItem( + context: context, icon: PopupAssetPath.nominal, - title: '2021 Nominal GDP (AED)', + title: context.translate('2021 Nominal GDP (AED)','2021 الناتج المحلي الإجمالي الاسمي (درهم)'), value: '1.8 T', rank: '26', rankDirection: Icons.arrow_downward, @@ -366,8 +394,9 @@ class CategoryPopupContent extends StatelessWidget { ), lineBorder, _GDPMetricItem( + context: context, icon: PopupAssetPath.real, - title: '2021 Real GDP (AED)', + title: context.translate('2021 Real GDP (AED)','2021 الناتج المحلي الإجمالي الحقيقي (درهم)'), value: '2.08 T', rank: '22', rankDirection: Icons.arrow_downward, @@ -375,8 +404,9 @@ class CategoryPopupContent extends StatelessWidget { ), lineBorder, _GDPMetricItem( + context: context, icon: PopupAssetPath.perCapita, - title: '2021 GDP Per Capita (AED)', + title: context.translate('2021 GDP Per Capita (AED)','الناتج المحلي الإجمالي الحقيقي'), value: '39.38 K', rank: '64', rankDirection: Icons.arrow_downward, @@ -386,13 +416,13 @@ class CategoryPopupContent extends StatelessWidget { const SizedBox(height: 8), Image.asset(PopupAssetPath.IncomeLevel,width: 40,height: 40,), const SizedBox(height: 4), - const Text( - 'Income Level', + Text( + context.translate('Income Level','مستوى الدخل'), style: TextStyle(color: Color(0xFF666666),fontSize: 16), ), const SizedBox(height: 4), - const Text( - 'Upper Middle Income', + Text( + context.translate('Upper Middle Income','الدخل المتوسط الأعلى'), style: TextStyle(fontWeight: FontWeight.bold, fontSize: 28), ), const SizedBox(height: 16), @@ -405,24 +435,27 @@ class CategoryPopupContent extends StatelessWidget { children: [ const SizedBox(height: 16), _FDIItem( + context: context, icon: PopupAssetPath.outflows, - title: '2020 FDI Outflows (AED)', + title: context.translate('2020 FDI Outflows (AED)','2020 تدفقات الاستثمار الأجنبي المباشر الخارجية (درهم)'), value: '4.75 B', growthRate: '-15.94%', isPositive: false, ), lineBorder, _FDIItem( + context: context, icon: PopupAssetPath.inflows, - title: '2020 FDI Inflows (AED)', + title: context.translate('2020 FDI Inflows (AED)','2020 تدفقات الاستثمار الأجنبي المباشر (درهم)'), value: '14.75 B', growthRate: '-39.68%', isPositive: false, ), lineBorder, _FDIItem( + context: context, icon: PopupAssetPath.stocks, - title: '2021 FDI Stocks (AED)', + title: context.translate('2021 FDI Stocks (AED)','2021 أسهم الاستثمار الأجنبي المباشر (درهم)'), value: '18.98 B', growthRate: '89.75%', isPositive: true, @@ -437,24 +470,27 @@ class CategoryPopupContent extends StatelessWidget { children: [ const SizedBox(height: 16), _TradeItem( + context: context, icon: PopupAssetPath.trade, - title: '2021 Total Trade (AED)', + title: context.translate('2021 Total Trade (AED)','2021 إجمالي التجارة (درهم)'), value: '603 B', growthRate: '39.89%', isPositive: true, ), lineBorder, _TradeItem( + context: context, icon: PopupAssetPath.imports, - title: '2021 Imports (AED)', + title: context.translate('2021 Imports (AED)','2021 الواردات (درهم)'), value: '272.9 B', growthRate: '40.79%', isPositive: true, ), lineBorder, _TradeItem( + context: context, icon: PopupAssetPath.exports, - title: '2021 Exports (AED)', + title: context.translate('2021 Exports (AED)','الصادرات (درهم)'), value: '330.1 B', growthRate: '39.15%', isPositive: true, @@ -468,17 +504,21 @@ class CategoryPopupContent extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ const SizedBox(height: 16), - const Center( - child: Text( - 'UAE Bilateral Trade (2022)', - style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold), + Padding( + padding: const EdgeInsets.all(16.0), + child: Center( + child: Text( + textAlign: TextAlign.center, + context.translate('UAE Bilateral Trade (2022)','التجارة الثنائية بين الإمارات العربية المتحدة (2022)'), + style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold), + ), ), ), const SizedBox(height: 8), - const Center( + Center( child: Text.rich( TextSpan( - text:'Total ', + text:context.translate('Total ','المجموع '), style: TextStyle(fontSize: 20,), children: [ TextSpan( @@ -501,21 +541,21 @@ class CategoryPopupContent extends StatelessWidget { width: screenWidth * 0.90, child:Row( mainAxisAlignment: MainAxisAlignment.spaceEvenly, - children: const [ + children: [ _BilateralTradeValueBox( - label: 'Total Import', + label: context.translate('Total Import','إجمالي الواردات'), value: '\$390.2M', color: Color(0xFF5BB3AA), isSelected: true, ), _BilateralTradeValueBox( - label: 'Total Export', + label: context.translate('Total Export','إجمالي الصادرات'), value: '\$42.2M', color: Color(0xFFB57184), isSelected: false, ), _BilateralTradeValueBox( - label: 'Total ReExport', + label: context.translate('Total ReExport','إجمالي إعادة التصدير'), value: '\$40.2M', color: Color(0xFF243E83), isSelected: false, @@ -525,9 +565,9 @@ class CategoryPopupContent extends StatelessWidget { ), ), const SizedBox(height: 24), - const Center( + Center( child: Text( - 'Top 5 Import Commodities', + context.translate('Top 5 Import Commodities','أهم 5 سلع مستوردة'), style: TextStyle( fontSize: 20, fontWeight: FontWeight.bold, @@ -538,27 +578,27 @@ class CategoryPopupContent extends StatelessWidget { yellowDivider, _CommodityRow( icon: PopupAssetPath.vegetable, - label: 'Vegetable Products', + label: context.translate('Vegetable Products','المنتجات النباتية'), value: '\$198.6M',), yellowDivider, _CommodityRow( icon: PopupAssetPath.food, - label: 'Foodstuffs, Beverages, Spirits And Tobacco', + label: context.translate('Foodstuffs, Beverages, Spirits And Tobacco','المواد الغذائية والمشروبات والمشروبات الروحية والتبغ'), value: '\$89.9M',), yellowDivider, _CommodityRow( icon: PopupAssetPath.metal, - label: 'Base Metals And Articles Of Base Metal', + label: context.translate('Base Metals And Articles Of Base Metal','المعادن الأساسية ومصنوعاتها'), value: '\$65.6M',), yellowDivider, _CommodityRow( icon: PopupAssetPath.animal, - label: 'Live Animals And Their Products', + label: context.translate('Live Animals And Their Products','الحيوانات الحية ومنتجاتها'), value: '\$23.7M',), yellowDivider, _CommodityRow( icon: PopupAssetPath.chemical, - label: 'Products Of The Chemical or Allied Industries', + label: context.translate('Products Of The Chemical or Allied Industries','منتجات الصناعات الكيميائية أو المرتبطة بها'), value: '\$4.7M',), const SizedBox(height: 16), ], @@ -573,6 +613,7 @@ Widget _DemographyItem({ required String icon, required String title, required String value, + required BuildContext context, }) { return Column( children: [ @@ -582,7 +623,7 @@ Widget _DemographyItem({ height: 40, ), const SizedBox(height: 4), - Text(title, style: const TextStyle(color: Color(0xFF666666),fontSize: 20)), + Text(title, style: const TextStyle(color: Color(0xFF666666),fontSize: 20),), const SizedBox(height: 4), Text( value, @@ -654,6 +695,7 @@ Widget _DemographyStatItem({ } Widget _GDPMetricItem({ + required BuildContext context, required String icon, required String title, required String value, @@ -695,7 +737,7 @@ Widget _GDPMetricItem({ ], ), Text( - 'Rank', + context.translate('Rank','رتبة'), style: const TextStyle(fontSize: 12, color: Color(0xFF666666)), ), ], @@ -712,6 +754,7 @@ Widget _FDIItem({ required String value, required String growthRate, required bool isPositive, + required BuildContext context, }) { return Column( children: [ @@ -748,7 +791,7 @@ Widget _FDIItem({ ), Text( - 'Growth Rate', + context.translate('Growth Rate',''), style: const TextStyle(fontSize: 12, color: Color(0xFF666666)), ), @@ -768,6 +811,7 @@ Widget _TradeItem({ required String value, required String growthRate, required bool isPositive, + required BuildContext context, }) { return Column( children: [ @@ -804,7 +848,7 @@ Widget _TradeItem({ ), Text( - 'Growth Rate', + context.translate('Growth Rate','معدل النمو'), style: const TextStyle(fontSize: 12, color: Color(0xFF666666)), ), @@ -835,7 +879,7 @@ class _BilateralTradeValueBox extends StatelessWidget { Widget build(BuildContext context) { return Container( height: 90, - padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8), + padding: const EdgeInsets.symmetric(horizontal: 5, vertical: 8), decoration: BoxDecoration( color: isSelected?Colors.white:Colors.transparent, borderRadius: BorderRadius.circular(10), @@ -857,7 +901,7 @@ class _BilateralTradeValueBox extends StatelessWidget { children: [ Text( label, - style: TextStyle(fontSize: 13,), + style: TextStyle(fontSize: 13), ), const SizedBox(height: 4), Text( @@ -909,13 +953,20 @@ void showCategoryPopup(BuildContext context, String category) { barrierColor: Colors.black.withValues(alpha: 0.3), builder: (context) => BackdropFilter( filter: ImageFilter.blur(sigmaX: 5, sigmaY: 5), - child: Dialog( - backgroundColor: Colors.white, - insetPadding: const EdgeInsets.symmetric(horizontal: 20, vertical: 40), - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(16), + child: Theme( + data: ThemeData( + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ),), + child: Dialog( + backgroundColor: Colors.white, + insetPadding: const EdgeInsets.symmetric(horizontal: 20, vertical: 40), + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(16), + ), + child: CategoryPopupContent(category: category), ), - child: CategoryPopupContent(category: category), ), ), ); diff --git a/lib/presentation/Screens/Bottom Navigation Pages/Country_Profile/country_profile.dart b/lib/presentation/Screens/Bottom Navigation Pages/Country_Profile/country_profile.dart index f56e4c02..8b207e00 100644 --- a/lib/presentation/Screens/Bottom Navigation Pages/Country_Profile/country_profile.dart +++ b/lib/presentation/Screens/Bottom Navigation Pages/Country_Profile/country_profile.dart @@ -22,23 +22,23 @@ class _CountryProfilePageState extends ConsumerState { final TextEditingController _searchController = TextEditingController(); final List> _allCountries = [ - {"name": "Afghanistan", "flag": "🇦🇫"}, - {"name": "Albania", "flag": "🇦🇱"}, - {"name": "Algeria", "flag": "🇩🇿"}, - {"name": "American Samoa", "flag": "🇦🇸"}, - {"name": "Andorra", "flag": "🇦🇩"}, - {"name": "Angola", "flag": "🇦🇴"}, - {"name": "Anguilla", "flag": "🇦🇮"}, - {"name": "Antigua And Barbuda", "flag": "🇦🇬"}, - {"name": "Argentina", "flag": "🇦🇷"}, - {"name": "Armenia", "flag": "🇦🇲"}, - {"name": "Aruba", "flag": "🇦🇼"}, - {"name": "Australia", "flag": "🇦🇺"}, - {"name": "Austria", "flag": "🇦🇹"}, - {"name": "Azerbaijan", "flag": "🇦🇿"}, - {"name": "Bahamas", "flag": "🇧🇸"}, - {"name": "Bahrain", "flag": "🇧🇭"}, - {"name": "Bangladesh", "flag": "🇧🇩"}, + {"name": "Afghanistan", "flag": "🇦🇫",'code':'AF'}, + {"name": "Albania", "flag": "🇦🇱",'code':'AL'}, + {"name": "Algeria", "flag": "🇩🇿",'code':'DZ'}, + {"name": "American Samoa", "flag": "🇦🇸",'code':'AS'}, + {"name": "Andorra", "flag": "🇦🇩",'code':'AD'}, + {"name": "Angola", "flag": "🇦🇴",'code':'AO'}, + {"name": "Anguilla", "flag": "🇦🇮",'code':'AI'}, + {"name": "Antigua And Barbuda", "flag": "🇦🇬",'code':'AG'}, + {"name": "Argentina", "flag": "🇦🇷",'code':'AR'}, + {"name": "Armenia", "flag": "🇦🇲",'code':'AM'}, + {"name": "Aruba", "flag": "🇦🇼",'code':'AW'}, + {"name": "Australia", "flag": "🇦🇺",'code':'AU'}, + {"name": "Austria", "flag": "🇦🇹",'code':'AT'}, + {"name": "Azerbaijan", "flag": "🇦🇿",'code':'AZ'}, + {"name": "Bahamas", "flag": "🇧🇸",'code':'BS'}, + {"name": "Bahrain", "flag": "🇧🇭",'code':'BH'}, + {"name": "Bangladesh", "flag": "🇧🇩",'code':'BD'}, ]; String _searchTerm = ''; @@ -160,7 +160,7 @@ class _CountryProfilePageState extends ConsumerState { onTap: () { context.push('/country-profile-detail', extra: { 'countryName': country['name'] as String, - 'flag': country['flag'] as String, + 'flag': country['code'] as String, }); }, );