CountryProfile Detailed page and popup Arabic

This commit is contained in:
Kalonkarthik 2025-06-27 17:23:22 +05:30
parent 9d37fa04d3
commit 7f805f0a72
8 changed files with 285 additions and 234 deletions

View File

@ -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  <EFBFBD>Åݰú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  <EFBFBD>Åݰú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  <EFBFBD>Åݰú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  <EFBFBD>Åݰú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  <EFBFBD>Åݰú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  <EFBFBD>Åݰú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  <EFBFBD>Åݰú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  <EFBFBD>Åݰú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  <EFBFBD>Åݰú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  <EFBFBD>Åݰú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  <EFBFBD>Åݰú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  <EFBFBD>Åݰú2 § œ¬ùšõ2
KC:\src\flutter\packages\flutter_tools\gradle\src\main\groovy\CMakeLists.txt  Í¢é…û2 § œ¬ùšõ2

View File

@ -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  <EFBFBD>£é…û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  <EFBFBD>£é…û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  <EFBFBD>£é…û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  <EFBFBD>£é…û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  <EFBFBD>£é…û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  <EFBFBD>£é…û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  <EFBFBD>£é…û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  <EFBFBD>£é…û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  <EFBFBD>£é…û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  <EFBFBD>£é…û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  <EFBFBD>£é…û2  _ ùÇ Þø2O
M
KC:\src\flutter\packages\flutter_tools\gradle\src\main\groovy\CMakeLists.txt  ™ÆÝ°ú2 § œ¬ùšõ2
KC:\src\flutter\packages\flutter_tools\gradle\src\main\groovy\CMakeLists.txt  <EFBFBD>£é…û2 § œ¬ùšõ2

View File

@ -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  <EFBFBD>¤é…û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  <EFBFBD>¤é…û2½ ¤ó Þø2k
i
gC:\Flutter Applications\Git_New\FCSC\android\app\.cxx\Debug\29y7472m\x86\android_gradle_build_mini.json  ÍÆÝ°ú2<18> °ó Þø2X
gC:\Flutter Applications\Git_New\FCSC\android\app\.cxx\Debug\29y7472m\x86\android_gradle_build_mini.json  <EFBFBD>¤é…û2<18> °ó Þø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  <EFBFBD>¤é…û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  <EFBFBD>¤é…û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  <EFBFBD>¤é…û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  <EFBFBD>¤é…û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  <EFBFBD>¤é…û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  <EFBFBD>¤é…û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  <EFBFBD>¤é…û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  <EFBFBD>¤é…û2  W ¹ó Þø2O
M
KC:\src\flutter\packages\flutter_tools\gradle\src\main\groovy\CMakeLists.txt  ÍÆÝ°ú2 § œ¬ùšõ2
KC:\src\flutter\packages\flutter_tools\gradle\src\main\groovy\CMakeLists.txt  <EFBFBD>¤é…û2 § œ¬ùšõ2

View File

@ -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 <20>•¡Þø2e
`C:\Flutter Applications\Git_New\FCSC\android\app\.cxx\Debug\29y7472m\x86_64\build_file_index.txt  ¿¤é…û2 K <20>•¡Þø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
KC:\src\flutter\packages\flutter_tools\gradle\src\main\groovy\CMakeLists.txt  À¤é…û2 § œ¬ùšõ2

Binary file not shown.

After

Width:  |  Height:  |  Size: 370 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 256 KiB

View File

@ -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),
),
),
);

View File

@ -22,23 +22,23 @@ class _CountryProfilePageState extends ConsumerState<CountryProfilePage> {
final TextEditingController _searchController = TextEditingController();
final List<Map<String, String>> _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<CountryProfilePage> {
onTap: () {
context.push('/country-profile-detail', extra: {
'countryName': country['name'] as String,
'flag': country['flag'] as String,
'flag': country['code'] as String,
});
},
);