UAE Number tab added
This commit is contained in:
parent
aef2798e76
commit
630b004ed0
@ -1,4 +1,4 @@
|
|||||||
org.gradle.jvmargs=-Xmx4G -XX:+HeapDumpOnOutOfMemoryError
|
org.gradle.jvmargs=-Xmx4G -XX:+HeapDumpOnOutOfMemoryError
|
||||||
android.useAndroidX=true
|
android.useAndroidX=true
|
||||||
android.enableJetifier=true
|
android.enableJetifier=true
|
||||||
org.gradle.java.home=C:\\Program Files\\Eclipse Adoptium\\jdk-17.0.13.11-hotspot
|
org.gradle.java.home=C:/Program Files/Eclipse Adoptium/jdk-21.0.5.11-hotspot
|
||||||
|
|||||||
@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
|
|||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-all.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-all.zip
|
||||||
|
|||||||
@ -294,6 +294,9 @@
|
|||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:go_router/go_router.dart';
|
import 'package:go_router/go_router.dart';
|
||||||
|
import 'package:uae_stat/presentation/Screens/Bottom%20Navigation%20Pages/competitiveness.dart';
|
||||||
|
import 'package:uae_stat/presentation/Screens/Bottom%20Navigation%20Pages/country_profile.dart';
|
||||||
|
import 'package:uae_stat/presentation/Screens/Bottom%20Navigation%20Pages/uae_numbers.dart';
|
||||||
import 'package:uae_stat/presentation/Screens/auth_verification/registration.dart';
|
import 'package:uae_stat/presentation/Screens/auth_verification/registration.dart';
|
||||||
import 'package:uae_stat/presentation/routes/drawer_routes/Drawer%20Items/user_guide/getting_started.dart';
|
import 'package:uae_stat/presentation/routes/drawer_routes/Drawer%20Items/user_guide/getting_started.dart';
|
||||||
import 'package:uae_stat/presentation/routes/drawer_routes/custom_drawer_routes.dart';
|
import 'package:uae_stat/presentation/routes/drawer_routes/custom_drawer_routes.dart';
|
||||||
@ -317,8 +320,8 @@ final GoRouter router = GoRouter(
|
|||||||
routes: [
|
routes: [
|
||||||
GoRoute(
|
GoRoute(
|
||||||
path: '/',
|
path: '/',
|
||||||
//builder: (context, state) => LoginRoute(),
|
//builder: (context, state) => LoginRoute(),
|
||||||
builder: (context, state) => LoginRoute(),
|
builder: (context, state) => MyHomePage(),
|
||||||
),
|
),
|
||||||
GoRoute(
|
GoRoute(
|
||||||
path: '/myhomepage',
|
path: '/myhomepage',
|
||||||
@ -378,31 +381,24 @@ final GoRouter router = GoRouter(
|
|||||||
path: '/user-guide',
|
path: '/user-guide',
|
||||||
builder: (context, state) => UserGuide(),
|
builder: (context, state) => UserGuide(),
|
||||||
routes: <RouteBase>[
|
routes: <RouteBase>[
|
||||||
GoRoute(path: '/features',
|
GoRoute(
|
||||||
name: 'features',
|
path: '/features',
|
||||||
builder: (context, state) => UsingFeatures(),
|
name: 'features',
|
||||||
|
builder: (context, state) => UsingFeatures(),
|
||||||
|
),
|
||||||
|
GoRoute(
|
||||||
|
path: '/faq',
|
||||||
|
name: 'faq',
|
||||||
|
builder: (context, state) => FAQPage(),
|
||||||
|
),
|
||||||
|
GoRoute(
|
||||||
|
path: '/gettingStarted',
|
||||||
|
name: 'gettingStarted',
|
||||||
|
builder: (context, state) => GettingStarted(),
|
||||||
),
|
),
|
||||||
|
|
||||||
GoRoute(path: '/faq',
|
|
||||||
name: 'faq',
|
|
||||||
builder: (context, state) => FAQPage(),
|
|
||||||
),
|
|
||||||
|
|
||||||
|
|
||||||
GoRoute(path: '/gettingStarted',
|
|
||||||
name: 'gettingStarted',
|
|
||||||
builder: (context, state) => GettingStarted(),
|
|
||||||
),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
// GoRoute(
|
|
||||||
// path: '/manageuser',
|
|
||||||
// builder: (context, state) {
|
|
||||||
// // Retrieve the title from extra or query params
|
|
||||||
// final title = state.extra as String? ?? 'Manage users';
|
|
||||||
// return ManageUserRouter(title: title);
|
|
||||||
// },
|
|
||||||
// ),
|
|
||||||
GoRoute(
|
GoRoute(
|
||||||
path: '/editProfile',
|
path: '/editProfile',
|
||||||
builder: (context, state) => EditProfile(),
|
builder: (context, state) => EditProfile(),
|
||||||
@ -411,5 +407,24 @@ builder: (context, state) => GettingStarted(),
|
|||||||
path: '/manageuser',
|
path: '/manageuser',
|
||||||
builder: (context, state) => ManageUserRouter(),
|
builder: (context, state) => ManageUserRouter(),
|
||||||
),
|
),
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Bottom Navigation Routes
|
||||||
|
GoRoute(
|
||||||
|
path: '/uaenumbers',
|
||||||
|
builder: (context, state) => UaeNumbers(),
|
||||||
|
),
|
||||||
|
|
||||||
|
GoRoute(
|
||||||
|
path: '/competitiveness',
|
||||||
|
builder: (context, state) => Competitiveness(),
|
||||||
|
),
|
||||||
|
|
||||||
|
GoRoute(
|
||||||
|
path: '/countryprofile',
|
||||||
|
builder: (context, state) => CountryProfile(),
|
||||||
|
),
|
||||||
|
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
|||||||
@ -0,0 +1,21 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:uae_stat/presentation/routes/drawer_routes/custom_drawer_routes.dart';
|
||||||
|
|
||||||
|
class Competitiveness extends StatelessWidget {
|
||||||
|
const Competitiveness({super.key});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
double myheight = MediaQuery.of(context).size.height;
|
||||||
|
double mywidth = MediaQuery.of(context).size.width;
|
||||||
|
return BaseScaffold(
|
||||||
|
title: Center(
|
||||||
|
child: SizedBox(
|
||||||
|
height: myheight / 5,
|
||||||
|
width: mywidth / 3,
|
||||||
|
child: Image(image: AssetImage('assets/logos/uae_stat.png')))),
|
||||||
|
body: CompetitivenessState(context),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
Widget CompetitivenessState(BuildContext context) {return Center(child: Text("Competitiveness"));}
|
||||||
|
}
|
||||||
@ -0,0 +1,272 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:uae_stat/presentation/components/constant/constant.dart';
|
||||||
|
import 'package:uae_stat/presentation/routes/drawer_routes/custom_drawer_routes.dart';
|
||||||
|
|
||||||
|
class CountryProfile extends StatelessWidget {
|
||||||
|
const CountryProfile({super.key});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
double myheight = MediaQuery.of(context).size.height;
|
||||||
|
double mywidth = MediaQuery.of(context).size.width;
|
||||||
|
return BaseScaffold(
|
||||||
|
title: Center(
|
||||||
|
child: SizedBox(
|
||||||
|
height: myheight / 5,
|
||||||
|
width: mywidth / 3,
|
||||||
|
child: Image(image: AssetImage('assets/logos/uae_stat.png')))),
|
||||||
|
body: CountryProfileWidget(),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class CountryProfileWidget extends StatelessWidget {
|
||||||
|
const CountryProfileWidget({super.key});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
double mywidth = MediaQuery.of(context).size.width;
|
||||||
|
return Padding(
|
||||||
|
padding: const EdgeInsets.all(16.0),
|
||||||
|
child: ListView(
|
||||||
|
children: [
|
||||||
|
CustomExpandableTile(
|
||||||
|
title: 'ECONOMY',
|
||||||
|
titleBackgroundColor: economyColor,
|
||||||
|
children: [
|
||||||
|
buildCategoryTitle('National Accounts',economyColor),
|
||||||
|
buildCardRow([
|
||||||
|
buildCard(context,'GDP (Constant)', '1.62T', '2022 (AED)',economyColor,economyColor,mywidth/2.5),
|
||||||
|
buildCard(context,'FDI', '1.45T', '2021 (AED)',economyColor,economyColor,mywidth/2.5),
|
||||||
|
]),
|
||||||
|
buildCategoryTitle('International Trade',economyColor),
|
||||||
|
buildCardRow([
|
||||||
|
buildCard(context,'Total Trade', '669.9B', 'Jan - Mar 2024 (AED)',economyColor,economyColor,mywidth/2.5),
|
||||||
|
buildCard(context,'Total Import', '686B', 'Jan - Mar 2024 (AED)',economyColor,economyColor,mywidth/2.5),
|
||||||
|
]),
|
||||||
|
buildCardRow([
|
||||||
|
buildCard(context,'Total Export', '669.9B', 'Jan - Mar 2024 (AED)',economyColor,economyColor,mywidth/2.5),
|
||||||
|
buildCard(context,'Total ReExport', '686B', 'Jan - Mar 2024 (AED)',economyColor,economyColor,mywidth/2.5),
|
||||||
|
]),
|
||||||
|
buildCategoryTitle('Prices',economyColor),
|
||||||
|
buildCardRow([
|
||||||
|
buildCard(context,'Total Export', '669.9B', 'Jan - Mar 2024 (AED)',economyColor,economyColor,mywidth/1.2),
|
||||||
|
]),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
CustomExpandableTile(
|
||||||
|
title: 'SOCIAL',
|
||||||
|
titleBackgroundColor: socialColor,
|
||||||
|
children: [
|
||||||
|
buildCategoryTitle('Population',socialColor),
|
||||||
|
buildCardRow([
|
||||||
|
InkWell(onTap: (){},child: buildCard(context,'Population', '9.89M', '2024',socialColor,socialColor,mywidth/2.5)),
|
||||||
|
buildCard(context,'Population Growth', '2.1%', '2023',socialColor,socialColor,mywidth/2.5),
|
||||||
|
]),
|
||||||
|
buildCategoryTitle('Vital Statistics',socialColor),
|
||||||
|
buildCardRow([
|
||||||
|
buildCard(context,'Marriages', '96%', '2023',socialColor,socialColor,mywidth/2.5),
|
||||||
|
buildCard(context,'Divorces', '1.2K', '2024',socialColor,socialColor,mywidth/2.5),
|
||||||
|
]),
|
||||||
|
buildCategoryTitle('Education',socialColor),
|
||||||
|
buildCardRow([
|
||||||
|
buildCard(context,'General Education', '96%', '2023',socialColor,socialColor,mywidth/2.5),
|
||||||
|
buildCard(context,'Higher Education', '1.2K', '2024',socialColor,socialColor,mywidth/2.5),
|
||||||
|
]),
|
||||||
|
buildCategoryTitle('Health',socialColor),
|
||||||
|
buildCardRow([
|
||||||
|
buildCard(context,'Hospital', '96%', '2023',socialColor,socialColor,mywidth/2.5),
|
||||||
|
buildCard(context,'Clinic and Centres', '1.2K', '2024',socialColor,socialColor,mywidth/2.5),
|
||||||
|
]),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
CustomExpandableTile(
|
||||||
|
title: 'ENVIRONMENT',
|
||||||
|
titleBackgroundColor: environmentColor,
|
||||||
|
children: [
|
||||||
|
buildCategoryTitle('Agriculture',environmentColor),
|
||||||
|
buildCardRow([
|
||||||
|
buildCard(context,'Crops - Total Area', '27°C', 'Average 2024',environmentColor,environmentColor,mywidth/2.5),
|
||||||
|
buildCard(context,'Livestock', '120mm', '2024',environmentColor,environmentColor,mywidth/2.5),
|
||||||
|
]),
|
||||||
|
buildCategoryTitle('Environment',environmentColor),
|
||||||
|
buildCardRow([
|
||||||
|
buildCard(context,'Climate - Max Temp', '15%', '2024',environmentColor,environmentColor,mywidth/2.5),
|
||||||
|
buildCard(context,'Climate - Min Temp', '30%', '2023',environmentColor,environmentColor,mywidth/2.5),
|
||||||
|
]),
|
||||||
|
buildCardRow([
|
||||||
|
buildCard(context,'Desalinated Produced Water', '15%', '2024',environmentColor,environmentColor,mywidth/2.5),
|
||||||
|
buildCard(context,'Area of Natural Reserves', '30%', '2023',environmentColor,environmentColor,mywidth/2.5),
|
||||||
|
]),
|
||||||
|
buildCategoryTitle('Energy',environmentColor),
|
||||||
|
buildCardRow([
|
||||||
|
buildCard(context,'Electricity Production', '15%', '2024',environmentColor,environmentColor,mywidth/2.5),
|
||||||
|
buildCard(context,'Renewable Energy Production', '30%', '2023',environmentColor,environmentColor,mywidth/2.5),
|
||||||
|
]),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget buildCategoryTitle(String title,Color color) {
|
||||||
|
return Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(vertical: 8.0),
|
||||||
|
child: Text(
|
||||||
|
title,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 16,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
color: color,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget buildCardRow(List<Widget> cards) {
|
||||||
|
return SingleChildScrollView(
|
||||||
|
scrollDirection: Axis.horizontal,
|
||||||
|
child: Row(
|
||||||
|
children: cards.map((card) {
|
||||||
|
return Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 8.0),
|
||||||
|
child: card,
|
||||||
|
);
|
||||||
|
}).toList(),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget buildCard(BuildContext context,String title, String value, String subtitle,Color bordercolor,boldColor,double mywidth) {
|
||||||
|
// double myheight = MediaQuery.of(context).size.height;
|
||||||
|
// double mywidth = MediaQuery.of(context).size.width;
|
||||||
|
return Card(
|
||||||
|
elevation: 2,
|
||||||
|
child: Container(
|
||||||
|
width: mywidth,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Colors.white, // Background color
|
||||||
|
border: Border.all(
|
||||||
|
color: bordercolor, // Border color
|
||||||
|
width: 2, // Border width
|
||||||
|
),
|
||||||
|
borderRadius: BorderRadius.circular(12), // Optional: Rounded corners
|
||||||
|
),
|
||||||
|
padding: const EdgeInsets.all(16.0),
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
title,
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
style: robotoRegular11,
|
||||||
|
),
|
||||||
|
SizedBox(height: 8),
|
||||||
|
Text(
|
||||||
|
subtitle,
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
style: subtitleStyle
|
||||||
|
),
|
||||||
|
SizedBox(height: 8),
|
||||||
|
Text(
|
||||||
|
value,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 26,
|
||||||
|
color: boldColor,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class CustomExpandableTile extends StatefulWidget {
|
||||||
|
final String title;
|
||||||
|
final Color titleBackgroundColor;
|
||||||
|
final List<Widget> children;
|
||||||
|
|
||||||
|
const CustomExpandableTile({
|
||||||
|
required this.title,
|
||||||
|
required this.titleBackgroundColor,
|
||||||
|
required this.children,
|
||||||
|
});
|
||||||
|
|
||||||
|
@override
|
||||||
|
_CustomExpandableTileState createState() => _CustomExpandableTileState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _CustomExpandableTileState extends State<CustomExpandableTile> {
|
||||||
|
bool isExpanded = false;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
double myheight = MediaQuery.of(context).size.height;
|
||||||
|
return Card(
|
||||||
|
elevation: 4,
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
setState(() {
|
||||||
|
isExpanded = !isExpanded;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: widget.titleBackgroundColor,
|
||||||
|
borderRadius: BorderRadius.all(Radius.circular(12))
|
||||||
|
),
|
||||||
|
padding: const EdgeInsets.all(12),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
widget.title,
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
fontSize: 18,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Icon(
|
||||||
|
isExpanded
|
||||||
|
? Icons.keyboard_arrow_up
|
||||||
|
: Icons.keyboard_arrow_down,
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
ClipRRect(
|
||||||
|
child: AnimatedContainer(
|
||||||
|
duration: Duration(milliseconds: 300),
|
||||||
|
curve: Curves.easeInOut,
|
||||||
|
width: double.infinity,
|
||||||
|
height: isExpanded ? myheight : 0,
|
||||||
|
child: isExpanded
|
||||||
|
? SingleChildScrollView(
|
||||||
|
child: Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Colors.white,
|
||||||
|
borderRadius: BorderRadius.all(Radius.circular(20))
|
||||||
|
),
|
||||||
|
|
||||||
|
padding: const EdgeInsets.all(10),
|
||||||
|
child: Column(
|
||||||
|
children: widget.children,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
: null,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,455 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:uae_stat/presentation/routes/bottom_bar_routes/tab_routes/home_route.dart';
|
||||||
|
import 'package:uae_stat/presentation/routes/drawer_routes/custom_drawer_routes.dart';
|
||||||
|
|
||||||
|
class UaeNumbers extends StatelessWidget {
|
||||||
|
const UaeNumbers({super.key});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
double myheight = MediaQuery.of(context).size.height;
|
||||||
|
double mywidth = MediaQuery.of(context).size.width;
|
||||||
|
return BaseScaffold(
|
||||||
|
title: Text("UAE Numbers"),
|
||||||
|
body:
|
||||||
|
//EconomicDashboard(),
|
||||||
|
//EconomyExpandTile()
|
||||||
|
CustomExpandableTile()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// class EconomicDashboard extends StatelessWidget {
|
||||||
|
// const EconomicDashboard({Key? key}) : super(key: key);
|
||||||
|
//
|
||||||
|
// @override
|
||||||
|
// Widget build(BuildContext context) {
|
||||||
|
//
|
||||||
|
// return SingleChildScrollView(
|
||||||
|
// child: Padding(
|
||||||
|
// padding: const EdgeInsets.all(16.0),
|
||||||
|
// child: Column(
|
||||||
|
// children: [
|
||||||
|
// // Search Bar
|
||||||
|
// Container(
|
||||||
|
// padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||||
|
// decoration: BoxDecoration(
|
||||||
|
// color: Colors.white,
|
||||||
|
// borderRadius: BorderRadius.circular(20),
|
||||||
|
// border: Border.all(
|
||||||
|
// color: Color(0xFFAA8E83), // Border color
|
||||||
|
// width: 3, // Border width
|
||||||
|
// ),
|
||||||
|
//
|
||||||
|
// ),
|
||||||
|
// child: const Row(
|
||||||
|
// children: [
|
||||||
|
// Icon(Icons.search, color: Colors.grey),
|
||||||
|
// SizedBox(width: 8),
|
||||||
|
// Expanded(
|
||||||
|
// child: TextField(
|
||||||
|
// decoration: InputDecoration(
|
||||||
|
// hintText: 'Search',
|
||||||
|
// border: InputBorder.none,
|
||||||
|
// hintStyle: TextStyle(color: Colors.grey),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
//
|
||||||
|
// const SizedBox(height: 16),
|
||||||
|
//
|
||||||
|
// // Economy Section
|
||||||
|
// _buildSection(
|
||||||
|
// 'ECONOMY',
|
||||||
|
// [
|
||||||
|
// _buildRow(
|
||||||
|
// [
|
||||||
|
// _buildCard('GDP (Growth)', '1.62T', Colors.blue[100]!),
|
||||||
|
// _buildCard('CPI', '1.45T', Colors.blue[100]!),
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// const SizedBox(height: 8),
|
||||||
|
// const Text(
|
||||||
|
// 'International Trade',
|
||||||
|
// style: TextStyle(fontWeight: FontWeight.bold),
|
||||||
|
// ),
|
||||||
|
// _buildRow(
|
||||||
|
// [
|
||||||
|
// _buildCard('Total Trade\nLast Year (2023) YOY', '669.9B', Colors.white),
|
||||||
|
// _buildCard('Total Import\nLast Year (2023) YOY', '686B', Colors.white),
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// _buildRow(
|
||||||
|
// [
|
||||||
|
// _buildCard('Total Export', '122.9B', Colors.white),
|
||||||
|
// _buildCard('Total Import', '161B', Colors.white),
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// const SizedBox(height: 8),
|
||||||
|
// const Text(
|
||||||
|
// 'Prices',
|
||||||
|
// style: TextStyle(fontWeight: FontWeight.bold),
|
||||||
|
// ),
|
||||||
|
// _buildCard('Inflation Rate', '215.4B', Colors.white, fullWidth: true,),
|
||||||
|
// ],context
|
||||||
|
// ),
|
||||||
|
//
|
||||||
|
// const SizedBox(height: 16),
|
||||||
|
//
|
||||||
|
// // Social Section
|
||||||
|
// _buildSection('SOCIAL', [
|
||||||
|
// _buildCard('Total Export', '122.9B', Colors.white),
|
||||||
|
// _buildCard('Total Import', '161B', Colors.white),
|
||||||
|
// ],context),
|
||||||
|
//
|
||||||
|
// const SizedBox(height: 16),
|
||||||
|
//
|
||||||
|
// // Environment Section
|
||||||
|
// _buildSection('ENVIRONMENT', [
|
||||||
|
// _buildCard('Total Export', '122.9B', Colors.white),
|
||||||
|
// _buildCard('Total Import', '161B', Colors.white),
|
||||||
|
// ],context)
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// );
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// Widget _buildSection(String title, List<Widget> children,BuildContext context) {
|
||||||
|
// double myheight = MediaQuery.of(context).size.height;
|
||||||
|
// double mywidth = MediaQuery.of(context).size.width;
|
||||||
|
// return Container(
|
||||||
|
// decoration: BoxDecoration(
|
||||||
|
// color: title == 'ECONOMY' ? Color(0xFF7DAFBC) : Color(0xFFAA8E83),
|
||||||
|
// borderRadius: BorderRadius.circular(16),
|
||||||
|
// ),
|
||||||
|
// child:
|
||||||
|
// ExpansionTile(
|
||||||
|
// iconColor: Colors.white,
|
||||||
|
// collapsedIconColor: Colors.white,
|
||||||
|
// title: Text(
|
||||||
|
// title,
|
||||||
|
// style: const TextStyle(fontWeight: FontWeight.bold,color: Colors.white),
|
||||||
|
// ),
|
||||||
|
// children: children,
|
||||||
|
// ),
|
||||||
|
// );
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// Widget _buildRow(List<Widget> children) {
|
||||||
|
// return Padding(
|
||||||
|
// padding: const EdgeInsets.symmetric(vertical: 4),
|
||||||
|
// child: Row(
|
||||||
|
// children: children.map((child) => Expanded(child: child)).toList(),
|
||||||
|
// ),
|
||||||
|
// );
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// Widget _buildCard(String title, String value, Color color, {bool fullWidth = false}) {
|
||||||
|
// return Container(
|
||||||
|
// margin: EdgeInsets.symmetric(horizontal: fullWidth ? 0 : 4),
|
||||||
|
// padding: const EdgeInsets.all(12),
|
||||||
|
// decoration: BoxDecoration(
|
||||||
|
// color: color,
|
||||||
|
// borderRadius: BorderRadius.circular(8),
|
||||||
|
// border: Border.all(color: Colors.grey[300]!),
|
||||||
|
// ),
|
||||||
|
// child: Column(
|
||||||
|
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
// children: [
|
||||||
|
// Text(
|
||||||
|
// title,
|
||||||
|
// style: TextStyle(
|
||||||
|
// fontSize: 12,
|
||||||
|
// color: Colors.grey[600],
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// const SizedBox(height: 4),
|
||||||
|
// Text(
|
||||||
|
// value,
|
||||||
|
// style: const TextStyle(
|
||||||
|
// fontSize: 16,
|
||||||
|
// fontWeight: FontWeight.bold,
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// );
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// class EconomyExpandTile extends StatefulWidget {
|
||||||
|
// @override
|
||||||
|
// _EconomyExpandTileState createState() => _EconomyExpandTileState();
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// class _EconomyExpandTileState extends State<EconomyExpandTile> {
|
||||||
|
// bool isExpanded = false;
|
||||||
|
//
|
||||||
|
// @override
|
||||||
|
// Widget build(BuildContext context) {
|
||||||
|
// return Card(
|
||||||
|
// elevation: 4,
|
||||||
|
// child: ExpansionTile(
|
||||||
|
// onExpansionChanged: (value) {
|
||||||
|
// setState(() {
|
||||||
|
// isExpanded = value;
|
||||||
|
// });
|
||||||
|
// },
|
||||||
|
// title: Container(
|
||||||
|
// color: Colors.blue,
|
||||||
|
// padding: const EdgeInsets.all(16),
|
||||||
|
// child: Text(
|
||||||
|
// 'ECONOMY',
|
||||||
|
// style: TextStyle(
|
||||||
|
// color: Colors.white,
|
||||||
|
// fontWeight: FontWeight.bold,
|
||||||
|
// fontSize: 18,
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// backgroundColor: Colors.white,
|
||||||
|
// collapsedBackgroundColor: Colors.blue,
|
||||||
|
// children: [
|
||||||
|
// Padding(
|
||||||
|
// padding: const EdgeInsets.all(16.0),
|
||||||
|
// child: Column(
|
||||||
|
// children: [
|
||||||
|
// buildCategoryTitle('National Accounts'),
|
||||||
|
// buildCardRow([
|
||||||
|
// buildCard('GDP (Constant)', '1.62T', '2022 (AED)'),
|
||||||
|
// buildCard('FDI', '1.45T', '2021 (AED)'),
|
||||||
|
// ]),
|
||||||
|
// buildCategoryTitle('International Trade'),
|
||||||
|
// buildCardRow([
|
||||||
|
// buildCard('Total Trade', '669.9B', 'Jan - Mar 2024 (AED)'),
|
||||||
|
// buildCard('Total Import', '686B', 'Jan - Mar 2024 (AED)'),
|
||||||
|
// ]),
|
||||||
|
// buildCardRow([
|
||||||
|
// buildCard('Total Export', '122.9B', 'Jan - Mar 2024 (AED)'),
|
||||||
|
// buildCard('Total ReExport', '161B', 'Jan - Mar 2024 (AED)'),
|
||||||
|
// ]),
|
||||||
|
// buildCategoryTitle('Prices'),
|
||||||
|
// buildCardRow([
|
||||||
|
// buildCard('Inflation Rate', '215.4B', '2023'),
|
||||||
|
// ]),
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// );
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// Widget buildCategoryTitle(String title) {
|
||||||
|
// return Padding(
|
||||||
|
// padding: const EdgeInsets.symmetric(vertical: 8.0),
|
||||||
|
// child: Text(
|
||||||
|
// title,
|
||||||
|
// style: TextStyle(
|
||||||
|
// fontSize: 16,
|
||||||
|
// fontWeight: FontWeight.bold,
|
||||||
|
// color: Colors.black54,
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// );
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// Widget buildCardRow(List<Widget> cards) {
|
||||||
|
// return SingleChildScrollView(
|
||||||
|
// scrollDirection: Axis.horizontal,
|
||||||
|
// child: Row(
|
||||||
|
// children: cards.map((card) {
|
||||||
|
// return Padding(
|
||||||
|
// padding: const EdgeInsets.symmetric(horizontal: 8.0),
|
||||||
|
// child: card,
|
||||||
|
// );
|
||||||
|
// }).toList(),
|
||||||
|
// ),
|
||||||
|
// );
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// Widget buildCard(String title, String value, String subtitle) {
|
||||||
|
// return Card(
|
||||||
|
// elevation: 2,
|
||||||
|
// child: Container(
|
||||||
|
// width: 150, // Fixed width for cards to make scrolling smoother
|
||||||
|
// padding: const EdgeInsets.all(16.0),
|
||||||
|
// child: Column(
|
||||||
|
// mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
// children: [
|
||||||
|
// Text(
|
||||||
|
// title,
|
||||||
|
// textAlign: TextAlign.center,
|
||||||
|
// style: TextStyle(fontWeight: FontWeight.bold),
|
||||||
|
// ),
|
||||||
|
// SizedBox(height: 8),
|
||||||
|
// Text(
|
||||||
|
// value,
|
||||||
|
// style: TextStyle(
|
||||||
|
// fontSize: 18,
|
||||||
|
// color: Colors.blue,
|
||||||
|
// fontWeight: FontWeight.bold,
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// SizedBox(height: 8),
|
||||||
|
// Text(
|
||||||
|
// subtitle,
|
||||||
|
// textAlign: TextAlign.center,
|
||||||
|
// style: TextStyle(color: Colors.black54, fontSize: 12),
|
||||||
|
// ),
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// );
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
class CustomExpandableTile extends StatefulWidget {
|
||||||
|
@override
|
||||||
|
_CustomExpandableTileState createState() => _CustomExpandableTileState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _CustomExpandableTileState extends State<CustomExpandableTile> {
|
||||||
|
bool isExpanded = false;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Card(
|
||||||
|
elevation: 4,
|
||||||
|
child: SingleChildScrollView(
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
// The tile header
|
||||||
|
GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
setState(() {
|
||||||
|
isExpanded = !isExpanded;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
color: Colors.blue,
|
||||||
|
padding: const EdgeInsets.all(16),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
'ECONOMY',
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
fontSize: 18,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Icon(
|
||||||
|
isExpanded ? Icons.keyboard_arrow_up : Icons.keyboard_arrow_down,
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
// Animated container for expansion
|
||||||
|
AnimatedContainer(
|
||||||
|
duration: Duration(milliseconds: 300),
|
||||||
|
curve: Curves.easeInOut,
|
||||||
|
height: isExpanded ? null : 0,
|
||||||
|
child: isExpanded
|
||||||
|
? Container(
|
||||||
|
color: Colors.white,
|
||||||
|
padding: const EdgeInsets.all(16),
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
buildCategoryTitle('National Accounts'),
|
||||||
|
buildCardRow([
|
||||||
|
buildCard('GDP (Constant)', '1.62T', '2022 (AED)'),
|
||||||
|
buildCard('FDI', '1.45T', '2021 (AED)'),
|
||||||
|
]),
|
||||||
|
buildCategoryTitle('International Trade'),
|
||||||
|
buildCardRow([
|
||||||
|
buildCard('Total Trade', '669.9B', 'Jan - Mar 2024 (AED)'),
|
||||||
|
buildCard('Total Import', '686B', 'Jan - Mar 2024 (AED)'),
|
||||||
|
]),
|
||||||
|
buildCategoryTitle('Prices'),
|
||||||
|
buildCardRow([
|
||||||
|
buildCard('Inflation Rate', '215.4B', '2023'),
|
||||||
|
]),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)
|
||||||
|
: Container(),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget buildCategoryTitle(String title) {
|
||||||
|
return Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(vertical: 8.0),
|
||||||
|
child: Text(
|
||||||
|
title,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 16,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
color: Colors.black54,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget buildCardRow(List<Widget> cards) {
|
||||||
|
return SingleChildScrollView(
|
||||||
|
scrollDirection: Axis.horizontal,
|
||||||
|
child: Row(
|
||||||
|
children: cards.map((card) {
|
||||||
|
return Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 8.0),
|
||||||
|
child: card,
|
||||||
|
);
|
||||||
|
}).toList(),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget buildCard(String title, String value, String subtitle) {
|
||||||
|
return Card(
|
||||||
|
elevation: 2,
|
||||||
|
child: Container(
|
||||||
|
width: 150,
|
||||||
|
padding: const EdgeInsets.all(16.0),
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
title,
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
style: TextStyle(fontWeight: FontWeight.bold),
|
||||||
|
),
|
||||||
|
SizedBox(height: 8),
|
||||||
|
Text(
|
||||||
|
value,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 18,
|
||||||
|
color: Colors.blue,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(height: 8),
|
||||||
|
Text(
|
||||||
|
subtitle,
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
style: TextStyle(color: Colors.black54, fontSize: 12),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
18
lib/presentation/components/constant/constant.dart
Normal file
18
lib/presentation/components/constant/constant.dart
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
const Color economyColor = Color(0xFF90B0D5);
|
||||||
|
const Color socialColor = Color(0xFFAA8E83);
|
||||||
|
const Color environmentColor = Color(0xFF7DAFBC);
|
||||||
|
const Color environmentboldColor = Color(0xFF90B0D5);
|
||||||
|
const TextStyle subtitleStyle = TextStyle(
|
||||||
|
fontFamily: 'Roboto', // Font family set to Roboto
|
||||||
|
fontWeight: FontWeight.w400, // Regular weight (w400)
|
||||||
|
fontSize: 11,
|
||||||
|
color: Color(0xFF8E8E8E) // Font size 11
|
||||||
|
);
|
||||||
|
const TextStyle robotoRegular11 = TextStyle(
|
||||||
|
fontFamily: 'Roboto', // Font family set to Roboto
|
||||||
|
fontWeight: FontWeight.w400, // Regular weight (w400)
|
||||||
|
fontSize: 11,
|
||||||
|
color: Color(0xFF000000) // Font size 11
|
||||||
|
);
|
||||||
@ -149,11 +149,11 @@ class BaseScaffold extends StatelessWidget {
|
|||||||
switch (route) {
|
switch (route) {
|
||||||
case '/':
|
case '/':
|
||||||
return 0;
|
return 0;
|
||||||
case '/about':
|
case '/uaenumbers':
|
||||||
return 1;
|
return 1;
|
||||||
case '/settings':
|
case '/competitiveness':
|
||||||
return 2;
|
return 2;
|
||||||
case '/profile':
|
case '/countryprofile':
|
||||||
return 3;
|
return 3;
|
||||||
default:
|
default:
|
||||||
return 0;
|
return 0;
|
||||||
@ -167,13 +167,13 @@ class BaseScaffold extends StatelessWidget {
|
|||||||
context.go('/');
|
context.go('/');
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
context.go('/about');
|
context.go('/uaenumbers');
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
context.go('/settings');
|
context.go('/competitiveness');
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
context.go('/profile');
|
context.go('/countryprofile');
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user