merge
This commit is contained in:
commit
015b606dd3
BIN
assets/country-profile/CategoryFile/BilateralTrade.png
Normal file
BIN
assets/country-profile/CategoryFile/BilateralTrade.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 83 KiB |
BIN
assets/country-profile/CategoryFile/Demo.png
Normal file
BIN
assets/country-profile/CategoryFile/Demo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 26 KiB |
BIN
assets/country-profile/CategoryFile/FDI.png
Normal file
BIN
assets/country-profile/CategoryFile/FDI.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 18 KiB |
BIN
assets/country-profile/CategoryFile/GDP.png
Normal file
BIN
assets/country-profile/CategoryFile/GDP.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 19 KiB |
BIN
assets/country-profile/CategoryFile/Trade.png
Normal file
BIN
assets/country-profile/CategoryFile/Trade.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 22 KiB |
BIN
assets/country-profile/alberto.png
Normal file
BIN
assets/country-profile/alberto.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 18 KiB |
@ -372,8 +372,8 @@ final GoRouter router = GoRouter(
|
||||
routes: [
|
||||
GoRoute(
|
||||
path: '/',
|
||||
// builder: (context, state) => LoginRoute(),
|
||||
builder: (context, state) => SessionCheckScreen(),
|
||||
builder: (context, state) => Competitiveness(),
|
||||
// builder: (context, state) => SessionCheckScreen(),
|
||||
),
|
||||
// GoRoute(
|
||||
// path: '/',
|
||||
@ -673,7 +673,7 @@ final GoRouter router = GoRouter(
|
||||
path: '/reportDetail',
|
||||
builder: (context, state) {
|
||||
final report = state.extra as Map<String, dynamic>;
|
||||
return ReportDetailPage(report: report);
|
||||
return ReportDetailPage();
|
||||
},
|
||||
),
|
||||
|
||||
|
||||
@ -118,6 +118,7 @@
|
||||
"new_password_required": "كلمة المرور الجديدة مطلوبة",
|
||||
"old_password_is_required": "كلمة المرور القديمة مطلوبة",
|
||||
"confirm_password_is_required": "تأكيد كلمة المرور مطلوب",
|
||||
"UAE Competitiveness":"التقارير التنافسيه لدولة الامارات",
|
||||
|
||||
"kpiCards": "يمكنك عرض بطاقات مؤشرات الأداء الرئيسية التفاعلية والرسوم البيانية لاستكشاف اتجاهات البيانات ومقارنة المقاييس الرئيسية بصريًا",
|
||||
"home_topic": "اختر أي فئة (على سيبل المثال : الاقتصاد، الاجتماعية، البيئة) لاستكشاف مؤشرات الأداء الرئيسية التفصيلية ، التصورات، ورؤى البيانات .",
|
||||
|
||||
@ -4,209 +4,202 @@ import 'package:uae_stat/domain/use_cases/language.dart';
|
||||
import 'package:uae_stat/presentation/routes/drawer_routes/custom_drawer_routes.dart';
|
||||
|
||||
class ReportDetailPage extends StatelessWidget {
|
||||
final Map<String, dynamic> report;
|
||||
|
||||
const ReportDetailPage({super.key, required this.report});
|
||||
const ReportDetailPage({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
double width = MediaQuery.of(context).size.width;
|
||||
|
||||
return BaseScaffold(
|
||||
title: Text(
|
||||
context.translate('UAE Competitiveness', 'القدرة التنافسية للإمارات'), // Add localization
|
||||
context.translate(
|
||||
'UAE Competitiveness',
|
||||
'التقارير التنافسيه لدولة الامارات',
|
||||
),
|
||||
style: TextStyle(
|
||||
fontFamily: context.translate('Roboto', 'NotoKufi'),
|
||||
fontFamily: context.translate(
|
||||
'Roboto',
|
||||
'NotoKufi',
|
||||
)
|
||||
),
|
||||
),
|
||||
// hasDrawer: false,
|
||||
showBackButton: true,
|
||||
body: SingleChildScrollView(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
// Header Section: Report Title and Image
|
||||
Center(
|
||||
child: Column(
|
||||
Container(
|
||||
padding: EdgeInsets.all(12),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.grey[100],
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
'Prosperity Index (2023)',
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
),
|
||||
Image.asset(
|
||||
'assets/competitiveness/solo.png',
|
||||
height: 80, // Increase size for prominence
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
Text(
|
||||
context.translate('Prosperity Index (2023)', 'مؤشر الازدهار (2023)'),
|
||||
style: const TextStyle(
|
||||
fontSize: 22,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
height: 71,
|
||||
width: 84,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 24),
|
||||
|
||||
// Description Section
|
||||
Text(
|
||||
context.translate(
|
||||
"The Legatum Prosperity Index is published annually by the Legatum Institute. It is a policy-focused report that measures the current state of prosperity since 2007. Using the Prosperity Index framework, nations around the world can assess their strengths and weaknesses in order to determine the economic and strategic choices that need to be made to further build inclusive societies, open economies, and empowered people to drive greater levels of prosperity.",
|
||||
"يُنشر مؤشر الازدهار الليجاتوم سنويًا من قبل معهد ليجاتوم. إنه تقرير يركز على السياسات ويقيس الحالة الحالية للازدهار منذ عام 2007. باستخدام إطار مؤشر الازدهار، يمكن للدول حول العالم تقييم نقاط قوتها وضعفها لتحديد الخيارات الاقتصادية والاستراتيجية التي يجب اتخاذها لتعزيز بناء مجتمعات شاملة واقتصادات مفتوحة وتمكين الأفراد لدفع مستويات أعلى من الازدهار.",
|
||||
),
|
||||
style: const TextStyle(fontSize: 14),
|
||||
const Text(
|
||||
'The Legatum Prosperity Index is published annually by the Legatum Institute. It is a policy-focused report that measures the current state of prosperity since 2007. Using the Prosperity Index framework, nations around the world can assess their strengths and weaknesses in order to determine the economic and strategic choices that need to be made to further build inclusive societies, open economies, and empowered people to drive greater levels of prosperity.',
|
||||
style: TextStyle(fontSize: 13),
|
||||
),
|
||||
const SizedBox(height: 24),
|
||||
|
||||
// Ranking Section (Using LeaderCard-like styling)
|
||||
Wrap(
|
||||
spacing: 16,
|
||||
runSpacing: 16,
|
||||
alignment: WrapAlignment.center,
|
||||
// Ranking section
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
children: [
|
||||
_RankingCard(
|
||||
title: context.translate('Rank in 2023', 'الترتيب في 2023'),
|
||||
value: "44",
|
||||
icon: const Icon(Icons.arrow_downward, color: Colors.red, size: 16),
|
||||
title: 'Rank in 2023',
|
||||
value: '44',
|
||||
icon: const Icon(Icons.arrow_downward, color: Colors.red, size: 25,weight: 50),
|
||||
),
|
||||
_RankingCard(
|
||||
title: context.translate('vs. Previous Edition', 'مقارنة بالإصدار السابق'),
|
||||
value: "41",
|
||||
icon: const SizedBox.shrink(), // No icon for this
|
||||
title: 'vs. Previous Edition',
|
||||
value: '41',
|
||||
icon: const SizedBox.shrink(),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 24),
|
||||
|
||||
// Country Rankings Section (Using CategoryButton-like styling)
|
||||
// Wrap(
|
||||
// spacing: 16,
|
||||
// runSpacing: 16,
|
||||
// alignment: WrapAlignment.center,
|
||||
// children: [
|
||||
// _CountryRankingButton(
|
||||
// title: context.translate('First Globally: DENMARK', 'الأول عالميًا: الدنمارك'),
|
||||
// imagePath: 'assets/flags/denmark.png',
|
||||
// color: const Color(0xFFD7C1AF),
|
||||
// ),
|
||||
// _CountryRankingButton(
|
||||
// title: context.translate('First in GCC: MULTIPLE COUNTRIES', 'الأول في دول الخليج: دول متعددة'),
|
||||
// imagePath: null, // No specific flag
|
||||
// color: const Color(0xFFAEC6CF),
|
||||
// ),
|
||||
// _CountryRankingButton(
|
||||
// title: context.translate('First in Arab Countries: UAE', 'الأول في الدول العربية: الإمارات'),
|
||||
// imagePath: 'assets/flags/uae.png',
|
||||
// color: const Color(0xFFD7AFAF),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// Country ranking section
|
||||
_CountryRankingItem(
|
||||
title: 'First Globally',
|
||||
country: 'DENMARK',
|
||||
flagPath: 'assets/country_flags/de.png',
|
||||
),
|
||||
const Divider(),
|
||||
_CountryRankingItem(
|
||||
title: 'First in Oman',
|
||||
country: 'Oman',
|
||||
flagPath: 'assets/country_flags/fk.png',
|
||||
),
|
||||
const Divider(),
|
||||
_CountryRankingItem(
|
||||
title: 'First in Arab Countries',
|
||||
country: 'UNITED ARAB EMIRATES',
|
||||
flagPath: 'assets/country_flags/ga.png',
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Ranking Card (similar to _LeaderCard)
|
||||
class _RankingCard extends StatelessWidget {
|
||||
final String title;
|
||||
final String value;
|
||||
final Widget icon;
|
||||
|
||||
const _RankingCard({
|
||||
Key? key,
|
||||
required this.title,
|
||||
required this.value,
|
||||
required this.icon,
|
||||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return SizedBox(
|
||||
width: 160,
|
||||
child: Container(
|
||||
padding: const EdgeInsets.all(12),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.grey[100],
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
),
|
||||
child: Column(
|
||||
children: [
|
||||
Text(
|
||||
title,
|
||||
textAlign: TextAlign.center,
|
||||
style: const TextStyle(
|
||||
fontSize: 13,
|
||||
color: Colors.black54,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 4),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
value,
|
||||
textAlign: TextAlign.center,
|
||||
style: const TextStyle(
|
||||
fontSize: 24,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 4),
|
||||
icon,
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Country Ranking Button (similar to _CategoryButton)
|
||||
class _CountryRankingButton extends StatelessWidget {
|
||||
final String title;
|
||||
final String? imagePath;
|
||||
final Color color;
|
||||
|
||||
const _CountryRankingButton({
|
||||
Key? key,
|
||||
required this.title,
|
||||
required this.imagePath,
|
||||
required this.color,
|
||||
}) : super(key: key);
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
margin: const EdgeInsets.symmetric(vertical: 6),
|
||||
width: 160,
|
||||
height: 70,
|
||||
padding: const EdgeInsets.all(12),
|
||||
decoration: BoxDecoration(
|
||||
color: color,
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
color: Colors.grey[100],
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
),
|
||||
alignment: Alignment.center,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
child: Column(
|
||||
children: [
|
||||
if (imagePath != null) ...[
|
||||
Image.asset(
|
||||
imagePath!,
|
||||
width: 24,
|
||||
height: 24,
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
],
|
||||
Flexible(
|
||||
child: Text(
|
||||
title,
|
||||
style: const TextStyle(
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 14,
|
||||
Text(
|
||||
title,
|
||||
textAlign: TextAlign.center,
|
||||
style: const TextStyle(fontSize: 13, color: Colors.black54),
|
||||
),
|
||||
const SizedBox(height: 4),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
value,
|
||||
style: const TextStyle(
|
||||
fontSize: 36,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
const SizedBox(width: 6),
|
||||
icon,
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
class _CountryRankingItem extends StatelessWidget {
|
||||
|
||||
final String title;
|
||||
final String country;
|
||||
final String flagPath;
|
||||
|
||||
const _CountryRankingItem({
|
||||
required this.title,
|
||||
required this.country,
|
||||
required this.flagPath,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
color: Colors.grey[100],
|
||||
padding: const EdgeInsets.symmetric(vertical: 12, horizontal: 8),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
title,
|
||||
style: const TextStyle(fontSize: 14, color: Colors.black54),
|
||||
),
|
||||
const SizedBox(height: 4),
|
||||
Text(
|
||||
country,
|
||||
style: const TextStyle(
|
||||
fontSize: 20,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 16),
|
||||
ClipOval(
|
||||
child: Container(
|
||||
width: 50,
|
||||
height: 50,
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
color: Colors.transparent,
|
||||
),
|
||||
child: Image.asset(flagPath, width: 50, height: 50, fit: BoxFit.cover),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
import 'dart:ui';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:uae_stat/presentation/routes/drawer_routes/custom_drawer_routes.dart';
|
||||
@ -19,34 +18,37 @@ class DetailedCountryProfilePage extends StatelessWidget {
|
||||
double width = MediaQuery.of(context).size.width;
|
||||
|
||||
return BaseScaffold(
|
||||
title: const Text('Country Profile'),
|
||||
// hasDrawer: false,
|
||||
title: const Text('Country Profile'),
|
||||
showBackButton: true,
|
||||
body: SingleChildScrollView(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
child: Column(
|
||||
children: [
|
||||
// Country name and flag
|
||||
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,
|
||||
),
|
||||
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,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 24),
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
|
||||
// Government Officials
|
||||
GridView.count(
|
||||
// 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(),
|
||||
@ -61,23 +63,28 @@ class DetailedCountryProfilePage extends StatelessWidget {
|
||||
),
|
||||
_LeaderCard(
|
||||
imagePath: 'assets/country-profile/alberto.png',
|
||||
name: 'Alberto Fernández',
|
||||
position: 'President',
|
||||
name: 'Cristina Fernández de Kirchner',
|
||||
position: 'Vice-President',
|
||||
),
|
||||
_LeaderCard(
|
||||
imagePath: 'assets/country-profile/alberto.png',
|
||||
name: 'Alberto Fernández',
|
||||
position: 'President',
|
||||
name: 'Agustin Rossi',
|
||||
position: 'Chief of the Cabinet of Ministers',
|
||||
),
|
||||
_LeaderCard(
|
||||
imagePath: 'assets/country-profile/alberto.png',
|
||||
name: 'Alberto Fernández',
|
||||
position: 'President',
|
||||
name: 'Cecilia Moreau',
|
||||
position: 'President of Chamber of Deputies',
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 24),
|
||||
Column(
|
||||
),
|
||||
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(
|
||||
@ -86,102 +93,63 @@ class DetailedCountryProfilePage extends StatelessWidget {
|
||||
Expanded(
|
||||
child: _CategoryButton(
|
||||
title: 'Demography',
|
||||
color: const Color(0xFFD7C1AF),
|
||||
overlayColor: const Color(0xE6AA947F),
|
||||
backgroundImagePath: 'assets/country-profile/CategoryFile/Demo.png',
|
||||
onTap: () => showCategoryPopup(context, 'Demography'),
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 16),
|
||||
const SizedBox(width: 12),
|
||||
Expanded(
|
||||
child: _CategoryButton(
|
||||
title: 'GDP',
|
||||
color: const Color(0xFFAEC6CF),
|
||||
overlayColor: const Color(0xFFAEC6CF),
|
||||
backgroundImagePath: 'assets/country-profile/CategoryFile/GDP.png',
|
||||
onTap: () => showCategoryPopup(context, 'GDP'),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
const SizedBox(height: 12),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
children: [
|
||||
Expanded(
|
||||
child: _CategoryButton(
|
||||
title: 'FDI',
|
||||
color: const Color(0xFFD7AFAF),
|
||||
overlayColor: const Color(0xD8C39898),
|
||||
backgroundImagePath: 'assets/country-profile/CategoryFile/FDI.png',
|
||||
onTap: () => showCategoryPopup(context, 'FDI'),
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 16),
|
||||
const SizedBox(width: 12),
|
||||
Expanded(
|
||||
child: _CategoryButton(
|
||||
title: 'Trade',
|
||||
color: const Color(0xFFAFCFAF),
|
||||
overlayColor: const Color(0xD8B0C5A4),
|
||||
backgroundImagePath: 'assets/country-profile/CategoryFile/Trade.png',
|
||||
onTap: () => showCategoryPopup(context, 'Trade'),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
const SizedBox(height: 12),
|
||||
// Full-width button
|
||||
_CategoryButton(
|
||||
title: 'Bilateral Trade',
|
||||
color: const Color(0xFF9FAFCF),
|
||||
overlayColor: const Color(0xB29CAFAB),
|
||||
backgroundImagePath: 'assets/country-profile/CategoryFile/BilateralTrade.png',
|
||||
onTap: () => showCategoryPopup(context, 'Bilateral Trade'),
|
||||
),
|
||||
],
|
||||
)
|
||||
|
||||
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
class _GDPItem extends StatelessWidget {
|
||||
final String title;
|
||||
final String value;
|
||||
final String rank;
|
||||
|
||||
const _GDPItem({
|
||||
required this.title,
|
||||
required this.value,
|
||||
required this.rank,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(title, style: TextStyle(color: Colors.grey)),
|
||||
SizedBox(height: 4),
|
||||
Row(
|
||||
children: [
|
||||
Text(
|
||||
value,
|
||||
style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold),
|
||||
),
|
||||
SizedBox(width: 8),
|
||||
Text(
|
||||
'$rank ↓',
|
||||
style: TextStyle(color: Colors.red, fontSize: 12),
|
||||
),
|
||||
SizedBox(width: 4),
|
||||
Text('Rank', style: TextStyle(fontSize: 10, color: Colors.grey)),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
class _LeaderCard extends StatelessWidget {
|
||||
final String imagePath;
|
||||
final String name;
|
||||
@ -197,54 +165,55 @@ class _LeaderCard extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
padding: const EdgeInsets.all(10),
|
||||
width: 170,
|
||||
height: 100,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.grey.shade300,
|
||||
blurRadius: 4,
|
||||
offset: const Offset(0, 2),
|
||||
),
|
||||
],
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
ClipRRect(
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
borderRadius: const BorderRadius.only(
|
||||
topLeft: Radius.circular(12),
|
||||
bottomLeft: Radius.circular(12),
|
||||
),
|
||||
child: Image.asset(
|
||||
imagePath,
|
||||
width: 70,
|
||||
height: 80,
|
||||
height: double.infinity,
|
||||
width: 80,
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
position,
|
||||
style: TextStyle(
|
||||
fontSize: 10,
|
||||
color: Colors.grey.shade600,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 10),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
position,
|
||||
style: TextStyle(
|
||||
fontSize: 10,
|
||||
color: Colors.grey.shade600,
|
||||
),
|
||||
maxLines: 2,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
maxLines: 2,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
const SizedBox(height: 2),
|
||||
Text(
|
||||
name,
|
||||
style: const TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 12,
|
||||
const SizedBox(height: 4),
|
||||
Text(
|
||||
name,
|
||||
style: const TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 12,
|
||||
),
|
||||
maxLines: 2,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
maxLines: 2,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
],
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
@ -252,15 +221,18 @@ class _LeaderCard extends StatelessWidget {
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class _CategoryButton extends StatelessWidget {
|
||||
final String title;
|
||||
final Color color;
|
||||
final Color overlayColor;
|
||||
final String backgroundImagePath;
|
||||
final VoidCallback onTap;
|
||||
|
||||
const _CategoryButton({
|
||||
super.key,
|
||||
required this.title,
|
||||
required this.color,
|
||||
required this.overlayColor,
|
||||
required this.backgroundImagePath,
|
||||
required this.onTap,
|
||||
});
|
||||
|
||||
@ -268,26 +240,43 @@ class _CategoryButton extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
return GestureDetector(
|
||||
onTap: onTap,
|
||||
child: Container(
|
||||
height: 100,
|
||||
width: double.infinity, // This ensures full width
|
||||
decoration: BoxDecoration(
|
||||
color: color,
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
),
|
||||
alignment: Alignment.center,
|
||||
child: Text(
|
||||
title,
|
||||
style: const TextStyle(
|
||||
fontSize: 16,
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.bold,
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
child: Container(
|
||||
height: 100,
|
||||
decoration: BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage(backgroundImagePath),
|
||||
fit: BoxFit.cover,
|
||||
colorFilter: ColorFilter.mode(
|
||||
overlayColor.withOpacity(0.8),
|
||||
BlendMode.dstATop,
|
||||
),
|
||||
),
|
||||
),
|
||||
child: BackdropFilter(
|
||||
filter: ImageFilter.blur(sigmaX: 2.0, sigmaY: 2.0),
|
||||
child: Container(
|
||||
color: overlayColor.withOpacity(0.6),
|
||||
child: Center(
|
||||
child: Text(
|
||||
title,
|
||||
style: const TextStyle(
|
||||
fontSize: 18,
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class CategoryPopupContent extends StatelessWidget {
|
||||
final String category;
|
||||
|
||||
@ -311,21 +300,18 @@ class CategoryPopupContent extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
|
||||
_DemographyItem(
|
||||
icon: Icons.location_city,
|
||||
title: 'Capital City',
|
||||
value: 'Buenos Aires',
|
||||
),
|
||||
Divider(),
|
||||
|
||||
const Divider(),
|
||||
_DemographyItem(
|
||||
icon: Icons.map,
|
||||
title: 'Surface Area',
|
||||
value: '2,780,400 sq. km',
|
||||
),
|
||||
Divider(),
|
||||
|
||||
const Divider(),
|
||||
_DemographyStatItem(
|
||||
icon: Icons.groups,
|
||||
title: '2021 Population',
|
||||
@ -333,8 +319,7 @@ class CategoryPopupContent extends StatelessWidget {
|
||||
suffix: '32 ↑ Rank',
|
||||
suffixStyle: const TextStyle(color: Colors.green, fontSize: 12),
|
||||
),
|
||||
Divider(),
|
||||
|
||||
const Divider(),
|
||||
_DemographyStatItem(
|
||||
icon: Icons.male,
|
||||
title: '2021 Male Population',
|
||||
@ -342,8 +327,7 @@ class CategoryPopupContent extends StatelessWidget {
|
||||
suffix: '0.98% ↑ Growth Rate',
|
||||
valueColor: Colors.deepPurple,
|
||||
),
|
||||
Divider(),
|
||||
|
||||
const Divider(),
|
||||
_DemographyStatItem(
|
||||
icon: Icons.female,
|
||||
title: '2021 Female Population',
|
||||
@ -351,7 +335,6 @@ class CategoryPopupContent extends StatelessWidget {
|
||||
suffix: '0.93% ↑ Growth Rate',
|
||||
valueColor: Colors.purple,
|
||||
),
|
||||
|
||||
const SizedBox(height: 16),
|
||||
],
|
||||
);
|
||||
@ -370,7 +353,6 @@ class CategoryPopupContent extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
|
||||
_GDPMetricItem(
|
||||
icon: Icons.apartment,
|
||||
title: '2021 Nominal GDP (AED)',
|
||||
@ -379,8 +361,7 @@ class CategoryPopupContent extends StatelessWidget {
|
||||
rankDirection: '↓',
|
||||
rankColor: Colors.red,
|
||||
),
|
||||
Divider(),
|
||||
|
||||
const Divider(),
|
||||
_GDPMetricItem(
|
||||
icon: Icons.public,
|
||||
title: '2021 Real GDP (AED)',
|
||||
@ -389,8 +370,7 @@ class CategoryPopupContent extends StatelessWidget {
|
||||
rankDirection: '↓',
|
||||
rankColor: Colors.red,
|
||||
),
|
||||
Divider(),
|
||||
|
||||
const Divider(),
|
||||
_GDPMetricItem(
|
||||
icon: Icons.groups_3,
|
||||
title: '2021 GDP Per Capita (AED)',
|
||||
@ -399,10 +379,9 @@ class CategoryPopupContent extends StatelessWidget {
|
||||
rankDirection: '↓',
|
||||
rankColor: Colors.red,
|
||||
),
|
||||
Divider(),
|
||||
|
||||
const Divider(),
|
||||
const SizedBox(height: 8),
|
||||
Icon(Icons.stacked_bar_chart, color: Colors.grey),
|
||||
const Icon(Icons.stacked_bar_chart, color: Colors.grey),
|
||||
const SizedBox(height: 4),
|
||||
const Text(
|
||||
'Income Level',
|
||||
@ -431,7 +410,6 @@ class CategoryPopupContent extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
|
||||
_FDIItem(
|
||||
icon: Icons.trending_down,
|
||||
title: '2020 FDI Outflows (AED)',
|
||||
@ -439,8 +417,7 @@ class CategoryPopupContent extends StatelessWidget {
|
||||
growthRate: '-15.94%',
|
||||
isPositive: false,
|
||||
),
|
||||
Divider(),
|
||||
|
||||
const Divider(),
|
||||
_FDIItem(
|
||||
icon: Icons.swap_horizontal_circle_outlined,
|
||||
title: '2020 FDI Inflows (AED)',
|
||||
@ -448,8 +425,7 @@ class CategoryPopupContent extends StatelessWidget {
|
||||
growthRate: '-39.68%',
|
||||
isPositive: false,
|
||||
),
|
||||
Divider(),
|
||||
|
||||
const Divider(),
|
||||
_FDIItem(
|
||||
icon: Icons.thumb_up_alt_outlined,
|
||||
title: '2021 FDI Stocks (AED)',
|
||||
@ -475,7 +451,6 @@ class CategoryPopupContent extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
|
||||
_TradeItem(
|
||||
icon: Icons.cached,
|
||||
title: '2021 Total Trade (AED)',
|
||||
@ -483,8 +458,7 @@ class CategoryPopupContent extends StatelessWidget {
|
||||
growthRate: '39.89%',
|
||||
isPositive: true,
|
||||
),
|
||||
Divider(),
|
||||
|
||||
const Divider(),
|
||||
_TradeItem(
|
||||
icon: Icons.download_outlined,
|
||||
title: '2021 Imports (AED)',
|
||||
@ -492,8 +466,7 @@ class CategoryPopupContent extends StatelessWidget {
|
||||
growthRate: '40.79%',
|
||||
isPositive: true,
|
||||
),
|
||||
Divider(),
|
||||
|
||||
const Divider(),
|
||||
_TradeItem(
|
||||
icon: Icons.upload_outlined,
|
||||
title: '2021 Exports (AED)',
|
||||
@ -538,9 +511,18 @@ class CategoryPopupContent extends StatelessWidget {
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
children: const [
|
||||
_BilateralTradeValueBox(label: 'Total Import', value: '\$390.2M', color: Color(0xFF00B292)),
|
||||
_BilateralTradeValueBox(label: 'Total Export', value: '\$42.2M', color: Color(0xFFDE4D86)),
|
||||
_BilateralTradeValueBox(label: 'Total ReExport', value: '\$40.2M', color: Color(0xFF4D52A1)),
|
||||
_BilateralTradeValueBox(
|
||||
label: 'Total Import',
|
||||
value: '\$390.2M',
|
||||
color: Color(0xFF00B292)),
|
||||
_BilateralTradeValueBox(
|
||||
label: 'Total Export',
|
||||
value: '\$42.2M',
|
||||
color: Color(0xFFDE4D86)),
|
||||
_BilateralTradeValueBox(
|
||||
label: 'Total ReExport',
|
||||
value: '\$40.2M',
|
||||
color: Color(0xFF4D52A1)),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 24),
|
||||
@ -548,25 +530,41 @@ class CategoryPopupContent extends StatelessWidget {
|
||||
child: Text(
|
||||
'Top 5 Import Commodities',
|
||||
style: TextStyle(
|
||||
fontSize: 16, fontWeight: FontWeight.bold, color: Color(0xFF4FBFA8)),
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Color(0xFF4FBFA8)),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
_CommodityRow(icon: Icons.eco, label: 'Vegetable Products', value: '\$198.6M'),
|
||||
_CommodityRow(icon: Icons.liquor, label: 'Foodstuffs, Beverages, Spirits And Tobacco', value: '\$89.9M'),
|
||||
_CommodityRow(icon: Icons.build, label: 'Base Metals And Articles Of Base Metal', value: '\$65.6M'),
|
||||
_CommodityRow(icon: Icons.pets, label: 'Live Animals And Their Products', value: '\$23.7M'),
|
||||
_CommodityRow(icon: Icons.science, label: 'Products Of The Chemical or Allied Industries', value: '\$4.7M'),
|
||||
_CommodityRow(
|
||||
icon: Icons.eco,
|
||||
label: 'Vegetable Products',
|
||||
value: '\$198.6M'),
|
||||
_CommodityRow(
|
||||
icon: Icons.liquor,
|
||||
label: 'Foodstuffs, Beverages, Spirits And Tobacco',
|
||||
value: '\$89.9M'),
|
||||
_CommodityRow(
|
||||
icon: Icons.build,
|
||||
label: 'Base Metals And Articles Of Base Metal',
|
||||
value: '\$65.6M'),
|
||||
_CommodityRow(
|
||||
icon: Icons.pets,
|
||||
label: 'Live Animals And Their Products',
|
||||
value: '\$23.7M'),
|
||||
_CommodityRow(
|
||||
icon: Icons.science,
|
||||
label: 'Products Of The Chemical or Allied Industries',
|
||||
value: '\$4.7M'),
|
||||
const SizedBox(height: 16),
|
||||
],
|
||||
);
|
||||
// Add other categories here...
|
||||
|
||||
default:
|
||||
return Center(child: Text('$category details coming soon.'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Widget _DemographyItem({
|
||||
required IconData icon,
|
||||
required String title,
|
||||
@ -586,6 +584,7 @@ Widget _DemographyItem({
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Widget _DemographyStatItem({
|
||||
required IconData icon,
|
||||
required String title,
|
||||
@ -624,6 +623,7 @@ Widget _DemographyStatItem({
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Widget _GDPMetricItem({
|
||||
required IconData icon,
|
||||
required String title,
|
||||
@ -667,6 +667,7 @@ Widget _GDPMetricItem({
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Widget _FDIItem({
|
||||
required IconData icon,
|
||||
required String title,
|
||||
@ -699,6 +700,7 @@ Widget _FDIItem({
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Widget _TradeItem({
|
||||
required IconData icon,
|
||||
required String title,
|
||||
@ -731,6 +733,7 @@ Widget _TradeItem({
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
class _BilateralTradeValueBox extends StatelessWidget {
|
||||
final String label;
|
||||
final String value;
|
||||
@ -786,12 +789,16 @@ Widget _CommodityRow({
|
||||
Expanded(
|
||||
child: Text(label, style: const TextStyle(fontSize: 14)),
|
||||
),
|
||||
Text(value, style: const TextStyle(fontWeight: FontWeight.bold, color: Colors.teal)),
|
||||
Text(
|
||||
value,
|
||||
style: const TextStyle(
|
||||
fontWeight: FontWeight.bold, color: Colors.teal),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
//pop-up
|
||||
|
||||
void showCategoryPopup(BuildContext context, String category) {
|
||||
showDialog(
|
||||
context: context,
|
||||
@ -811,6 +818,4 @@ void showCategoryPopup(BuildContext context, String category) {
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -122,7 +122,6 @@ flutter:
|
||||
- assets/backgrounds/
|
||||
- assets/backgrounds/from_alsaray/
|
||||
- assets/country_flags/
|
||||
- assets/country-profile/
|
||||
- assets/competitiveness/
|
||||
- assets/cached_responses/informatica/
|
||||
- assets/cached_responses/sharepoint/
|
||||
@ -159,6 +158,7 @@ flutter:
|
||||
- assets/FCSC-GIF.gif
|
||||
- assets/icons/enquiry/
|
||||
- assets/country-profile/
|
||||
- assets/country-profile/CategoryFile/
|
||||
- assets/competitiveness/
|
||||
|
||||
fonts:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user