diff --git a/.run/main.dart.run.xml b/.run/main.dart.run.xml
index 4a58a7c9..4767aff8 100644
--- a/.run/main.dart.run.xml
+++ b/.run/main.dart.run.xml
@@ -1,6 +1,6 @@
-
+
\ No newline at end of file
diff --git a/android/app/build.gradle b/android/app/build.gradle
index 490ff3ac..ec52a38b 100644
--- a/android/app/build.gradle
+++ b/android/app/build.gradle
@@ -26,8 +26,8 @@ if (flutterVersionName == null) {
android {
namespace = "ae.gov.fcsc.frontend"
compileSdk = flutter.compileSdkVersion
- ndkVersion = flutter.ndkVersion
-
+ // ndkVersion = flutter.ndkVersion
+ ndkVersion = "25.1.8937393"
compileOptions {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
diff --git a/lib/config/my_router.dart b/lib/config/my_router.dart
index 6e2daf40..8a8a1fc8 100644
--- a/lib/config/my_router.dart
+++ b/lib/config/my_router.dart
@@ -294,9 +294,7 @@
import 'package:flutter/material.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/Bottom%20Navigation%20Pages/UAE_Numbers/Social/marriages.dart';
import 'package:uae_stat/presentation/Screens/auth_verification/registration.dart';
import 'package:uae_stat/presentation/Screens/charts/chart.dart';
import 'package:uae_stat/presentation/Screens/charts/screens/chart_screen.dart';
@@ -304,6 +302,10 @@ import 'package:uae_stat/presentation/Screens/demo_home2.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/Screens/Bottom Navigation Pages/UAE_Numbers/uae_numbers.dart';
+import 'package:uae_stat/presentation/Screens/Bottom Navigation Pages/Competitiveness/competitiveness.dart';
+import 'package:uae_stat/presentation/Screens/Bottom Navigation Pages/Country_Profile/country_profile.dart';
+
import '../domain/use_cases/preferences_use_case.dart';
import '../presentation/Screens/auth_verification/changepassword.dart';
import '../presentation/Screens/auth_verification/confirm_password.dart';
@@ -324,8 +326,8 @@ final GoRouter router = GoRouter(
routes: [
GoRoute(
path: '/',
- builder: (context, state) => LoginRoute(),
- // builder: (context, state) => MyHomePage(),
+ //builder: (context, state) => LoginRoute(),
+ builder: (context, state) => MyHomePage(),
),
GoRoute(
path: '/login',
@@ -415,24 +417,30 @@ final GoRouter router = GoRouter(
path: '/user-guide',
builder: (context, state) => UserGuide(),
routes: [
- GoRoute(
- path: '/features',
- name: 'features',
- builder: (context, state) => UsingFeatures(),
+ GoRoute(path: '/features',
+ name: 'features',
+ builder: (context, state) => UsingFeatures(),
),
- GoRoute(
- path: '/faq',
- name: 'faq',
- builder: (context, state) => FAQPage(),
+
+ GoRoute(path: '/faq',
+ name: 'faq',
+ builder: (context, state) => FAQPage(),
),
- GoRoute(
- path: '/gettingStarted',
- name: 'gettingStarted',
- builder: (context, state) => GettingStarted(),
+
+ 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(
path: '/editProfile',
builder: (context, state) => EditProfile(),
@@ -443,9 +451,13 @@ final GoRouter router = GoRouter(
),
// Bottom Navigation Routes
+ // GoRoute(
+ // path: '/uaenumbers',
+ // builder: (context, state) => UaeNumbers(),
+ // ),
GoRoute(
- path: '/uaenumbers',
- builder: (context, state) => UaeNumbers(),
+ path: '/uaenumbers',
+ builder: (context,state) => UaeNumbers()
),
GoRoute(
@@ -457,5 +469,10 @@ final GoRouter router = GoRouter(
path: '/countryprofile',
builder: (context, state) => CountryProfile(),
),
+
+ GoRoute(
+ path: '/marriages',
+ builder: (context, state) => Marriages(),
+ ),
],
);
diff --git a/lib/presentation/Screens/Bottom Navigation Pages/competitiveness.dart b/lib/presentation/Screens/Bottom Navigation Pages/Competitiveness/competitiveness.dart
similarity index 100%
rename from lib/presentation/Screens/Bottom Navigation Pages/competitiveness.dart
rename to lib/presentation/Screens/Bottom Navigation Pages/Competitiveness/competitiveness.dart
diff --git a/lib/presentation/Screens/Bottom Navigation Pages/Country_Profile/country_profile.dart b/lib/presentation/Screens/Bottom Navigation Pages/Country_Profile/country_profile.dart
new file mode 100644
index 00000000..58a1c5ae
--- /dev/null
+++ b/lib/presentation/Screens/Bottom Navigation Pages/Country_Profile/country_profile.dart
@@ -0,0 +1,142 @@
+import 'package:flutter/material.dart';
+import 'package:uae_stat/presentation/routes/drawer_routes/custom_drawer_routes.dart';
+import 'package:fl_chart/fl_chart.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) {
+ return HorizontalBarChart();
+ }
+}
+
+
+
+
+
+class HorizontalBarChart extends StatelessWidget {
+ final List xAxisData = ['2019', '2020', '2021', '2022', '2023'];
+ final List yAxisData = [2, 4, 1, 5, 3];
+
+
+ @override
+ Widget build(BuildContext context) {
+ double myheight = MediaQuery.of(context).size.height;
+ return Scaffold(
+ appBar: AppBar(title: Text('Horizontal Bar Chart')),
+ body: Padding(
+ padding: const EdgeInsets.all(16.0),
+ child:
+ Container(
+ height: myheight/4,
+ decoration: BoxDecoration(
+ color: Colors.white,
+ borderRadius: BorderRadius.circular(12),
+ boxShadow: [
+ BoxShadow(
+ color: Colors.black12,
+ blurRadius: 8,
+ offset: Offset(0, 4),
+ ),
+ ],
+ ),
+ child:
+ Padding(
+ padding: const EdgeInsets.only(top: 16,left: 8.0,right: 8.0,bottom: 8.0),
+ child: BarChart(
+ BarChartData(
+ alignment: BarChartAlignment.spaceAround,
+ maxY: 8,
+ barTouchData: BarTouchData(enabled: false),
+ titlesData: FlTitlesData(
+ leftTitles: AxisTitles(
+ sideTitles: SideTitles(
+ showTitles: true,
+ interval: 2,
+ getTitlesWidget: (value, meta) {
+ return Padding(
+ padding: const EdgeInsets.only(right: 8.0),
+ child: Text('${value.toInt()}K'),
+ );
+ },
+ reservedSize: 60,
+ ),
+ ),
+ bottomTitles: AxisTitles(
+ sideTitles: SideTitles(
+ showTitles: true,
+ getTitlesWidget: (value, meta) {
+ return Padding(
+ padding: const EdgeInsets.only(top: 8.0),
+ child: Text(xAxisData[value.toInt()]),
+ );
+ },
+ reservedSize: 40,
+ ),
+ ),
+ topTitles: AxisTitles(
+ sideTitles: SideTitles(showTitles: false), // Hides top titles
+ ),
+ rightTitles: AxisTitles(
+ sideTitles: SideTitles(showTitles: false), // Hides right titles
+ ),
+ ),
+ gridData: FlGridData(show: false),
+ borderData: FlBorderData(show: false),
+ barGroups: List.generate(
+ xAxisData.length,
+ (index) => BarChartGroupData(
+ x: index,
+ barRods: [
+ BarChartRodData(
+ toY: yAxisData[index],
+ color: Colors.blueAccent,
+ //colors: [Colors.blueAccent],
+ borderRadius: BorderRadius.circular(4),
+ width: 20,
+ ),
+ ],
+ ),
+ ),
+ ),
+ ),
+ ),
+ ),
+ ),
+ );
+ }
+}
+
+void main() {
+ runApp(MaterialApp(home: HorizontalBarChart()));
+}
+
+
+// void main() {
+// runApp(MaterialApp(home: HorizontalBarChart()));
+// }
+
+
+
+
+
+
+
diff --git a/lib/presentation/Screens/Bottom Navigation Pages/UAE_Numbers/Social/marriages.dart b/lib/presentation/Screens/Bottom Navigation Pages/UAE_Numbers/Social/marriages.dart
new file mode 100644
index 00000000..0a9a7e50
--- /dev/null
+++ b/lib/presentation/Screens/Bottom Navigation Pages/UAE_Numbers/Social/marriages.dart
@@ -0,0 +1,265 @@
+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';
+import 'package:fl_chart/fl_chart.dart';
+
+
+class Marriages extends StatelessWidget {
+ const Marriages({super.key});
+
+ @override
+ Widget build(BuildContext context) {
+ double myheight = MediaQuery.of(context).size.height;
+ double mywidth = MediaQuery.of(context).size.width;
+ final List xAxisData = ['2019', '2020', '2021', '2022', '2023'];
+ final List yAxisData = [2, 4, 1, 5, 3];
+ return BaseScaffold(
+ appbarColor: Color(0xFFC6BEB2),
+ title: Text("UAE Numbers",style: TextStyle(color: Colors.white,fontWeight: FontWeight.bold),),
+ showBackButton: true,
+ body: SingleChildScrollView(
+ child: Column(
+ children : [
+ Container(
+ height: myheight/4.5,
+ width: double.infinity,
+ color: Color(0xFFC6BEB2),
+ child: Padding(padding: EdgeInsets.only(left: 30,right: 30,top: 20,bottom: 10),child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Text("SOCIAL",style: TextStyle(color: Colors.white,fontSize: 30),),
+ Container(width: mywidth/5,child: Divider(thickness: 10,color: Colors.white,)),
+ Text("Marriages",style: TextStyle(color: Colors.white,fontSize: 20),),
+ Row(
+ mainAxisAlignment: MainAxisAlignment.end,
+ children: [
+ IconButton(onPressed: (){}, icon: Icon(Icons.bookmark_add_outlined,color: Colors.white,size: 40,)),
+ IconButton(onPressed: (){}, icon: Icon(Icons.share,color: Colors.white,size: 30,)),
+ ],),
+ ],
+ ),)
+ ),
+ SingleChildScrollView(child: Container(
+ height: myheight,
+ color: Color(0xFFC6BEB2),
+ child: Padding(
+ padding: const EdgeInsets.only(top: 0.0,left: 10,right: 10,bottom: 20),
+ child: Column(
+ children: [
+ Row(
+ mainAxisAlignment: MainAxisAlignment.spaceEvenly,
+ children: [
+ Container(height: myheight/3.5,width: mywidth/2.5,
+ decoration: BoxDecoration(
+ color: Colors.white,
+ borderRadius: BorderRadius.all(Radius.circular(10))
+ ),
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Image.asset(
+ 'assets/icons/indicator/social/marriage.png',
+ height: myheight / 10, // This ensures the image fits within the container's height
+ width: myheight / 10, // You can adjust the size as needed
+ ),
+ Text("Total",style: TextStyle(fontWeight: FontWeight.bold,fontSize: 26),),
+ Text("2022",style: TextStyle(fontSize: 15,color: Colors.grey),),
+ Text("16759",style: TextStyle(fontSize: 26,fontWeight: FontWeight.bold,color: socialColor),),
+ ],
+ ),
+ ),
+ Container(height: myheight/3.5,width: mywidth/2.5,
+ decoration: BoxDecoration(
+ color: Colors.white,
+ borderRadius: BorderRadius.all(Radius.circular(10))
+ ),
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Image.asset(
+ 'assets/icons/indicator/social/marriage.png',
+ height: myheight / 10, // This ensures the image fits within the container's height
+ width: myheight / 10, // You can adjust the size as needed
+ ),
+ Text("Average",style: TextStyle(fontWeight: FontWeight.bold,fontSize: 26),),
+ Text("(2021 - 2022)",style: TextStyle(fontSize: 15,color: Colors.grey),),
+ Text("15987",style: TextStyle(fontSize: 26,fontWeight: FontWeight.bold,color: socialColor),),
+ ],
+ ),
+ ),
+ ],
+ ),
+ SizedBox(height: myheight/20,),
+ Container(
+ height: myheight/2.5,
+ width: mywidth/1.2,
+ decoration: BoxDecoration(
+ color: Colors.white,
+ borderRadius: BorderRadius.all(Radius.circular(10))
+ ),
+ child: Padding(
+ padding: const EdgeInsets.all(10.0),
+ child: Column(
+ children: [
+ SizedBox(height: myheight/30,),
+ Center(child: Text("Total Marriages by Marriage Type",style: TextStyle(fontSize: 16,fontWeight: FontWeight.bold),),
+ ),
+ SizedBox(height: myheight/30,),
+ Container(
+ height: myheight/4,
+ decoration: BoxDecoration(
+ color: Colors.white,
+ borderRadius: BorderRadius.circular(12),
+ boxShadow: [
+ BoxShadow(
+ color: Colors.black12,
+ blurRadius: 8,
+ offset: Offset(0, 4),
+ ),
+ ],
+ ),
+ child:
+ Padding(
+ padding: const EdgeInsets.only(top: 16,left: 8.0,right: 8.0,bottom: 8.0),
+ child: BarChart(
+ BarChartData(
+ alignment: BarChartAlignment.spaceAround,
+ maxY: 8,
+ barTouchData: BarTouchData(enabled: false),
+ titlesData: FlTitlesData(
+ leftTitles: AxisTitles(
+ sideTitles: SideTitles(
+ showTitles: true,
+ interval: 2,
+ getTitlesWidget: (value, meta) {
+ return Padding(
+ padding: const EdgeInsets.only(right: 8.0),
+ child: Text('${value.toInt()}K'),
+ );
+ },
+ reservedSize: 60,
+ ),
+ ),
+ bottomTitles: AxisTitles(
+ sideTitles: SideTitles(
+ showTitles: true,
+ getTitlesWidget: (value, meta) {
+ return Padding(
+ padding: const EdgeInsets.only(top: 8.0),
+ child: Text(xAxisData[value.toInt()]),
+ );
+ },
+ reservedSize: 40,
+ ),
+ ),
+ topTitles: AxisTitles(
+ sideTitles: SideTitles(showTitles: false), // Hides top titles
+ ),
+ rightTitles: AxisTitles(
+ sideTitles: SideTitles(showTitles: false), // Hides right titles
+ ),
+ ),
+ gridData: FlGridData(show: false),
+ borderData: FlBorderData(show: false),
+ barGroups: List.generate(
+ xAxisData.length,
+ (index) => BarChartGroupData(
+ x: index,
+ barRods: [
+ BarChartRodData(
+ toY: yAxisData[index],
+ color: Colors.blueAccent,
+ //colors: [Colors.blueAccent],
+ borderRadius: BorderRadius.circular(4),
+ width: 20,
+ ),
+ ],
+ ),
+ ),
+ ),
+ ),
+ ),
+ ),
+ // Container(
+ // decoration: BoxDecoration(
+ // color: Colors.white,
+ // borderRadius: BorderRadius.circular(12),
+ // boxShadow: [
+ // BoxShadow(
+ // color: Colors.black12,
+ // blurRadius: 8,
+ // offset: Offset(0, 4),
+ // ),
+ // ],
+ // ),
+ // child:
+ // BarChart(
+ // BarChartData(
+ // alignment: BarChartAlignment.spaceAround,
+ // maxY: 20,
+ // barTouchData: BarTouchData(enabled: false),
+ // titlesData: FlTitlesData(
+ // leftTitles: AxisTitles(
+ // sideTitles: SideTitles(
+ // showTitles: true,
+ // getTitlesWidget: (value, meta) {
+ // return Padding(
+ // padding: const EdgeInsets.only(right: 8.0),
+ // child: Text('${value.toInt()}K'),
+ // );
+ // },
+ // reservedSize: 40,
+ // ),
+ // ),
+ // bottomTitles: AxisTitles(
+ // sideTitles: SideTitles(
+ // showTitles: true,
+ // getTitlesWidget: (value, meta) {
+ // return Padding(
+ // padding: const EdgeInsets.only(top: 8.0),
+ // child: Text(xAxisData[value.toInt()]),
+ // );
+ // },
+ // reservedSize: 40,
+ // ),
+ // ),
+ // ),
+ // gridData: FlGridData(show: false),
+ // borderData: FlBorderData(show: false),
+ // barGroups: List.generate(
+ // xAxisData.length,
+ // (index) => BarChartGroupData(
+ // x: index,
+ // barRods: [
+ // BarChartRodData(
+ // toY: yAxisData[index],
+ // color: Colors.blueAccent,
+ // //colors: [Colors.blueAccent],
+ // borderRadius: BorderRadius.circular(4),
+ // width: 20,
+ // ),
+ // ],
+ // ),
+ // ),
+ // ),
+ // ),
+ // ),
+
+ ],
+ ),
+ ),
+ )
+ ],
+ ),
+ ),
+
+
+ ),)
+ ]
+ ),
+ ), mycenterTitle: false,
+
+ );
+ }
+}
+
diff --git a/lib/presentation/Screens/Bottom Navigation Pages/uae_numbers.dart b/lib/presentation/Screens/Bottom Navigation Pages/UAE_Numbers/uae_numbers.dart
similarity index 96%
rename from lib/presentation/Screens/Bottom Navigation Pages/uae_numbers.dart
rename to lib/presentation/Screens/Bottom Navigation Pages/UAE_Numbers/uae_numbers.dart
index 6787e132..51c0e2aa 100644
--- a/lib/presentation/Screens/Bottom Navigation Pages/uae_numbers.dart
+++ b/lib/presentation/Screens/Bottom Navigation Pages/UAE_Numbers/uae_numbers.dart
@@ -1,4 +1,5 @@
import 'package:flutter/material.dart';
+import 'package:go_router/go_router.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';
import 'package:uae_stat/presentation/components/constant/constant.dart';
@@ -124,10 +125,10 @@ class uaenumberWidget extends StatelessWidget {
]),
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),
+ InkWell(onTap : (){
+ context.go('/marriages');
+ },child: buildCard(context,'Marriages', '96%', '2023',socialColor,socialColor,mywidth/2.5)),
+ InkWell(onTap : (){},child: buildCard(context,'Divorces', '1.2K', '2024',socialColor,socialColor,mywidth/2.5)),
]),
buildCategoryTitle('Education', socialColor),
buildCardRow([
@@ -316,7 +317,6 @@ class _CustomExpandableTileState extends State {
duration: Duration(milliseconds: 300),
curve: Curves.easeInOut,
width: double.infinity,
- height: isExpanded ? myheight : 0,
child: isExpanded
? SingleChildScrollView(
child: Container(
diff --git a/lib/presentation/Screens/Bottom Navigation Pages/country_profile.dart b/lib/presentation/Screens/Bottom Navigation Pages/country_profile.dart
deleted file mode 100644
index 8d3f1081..00000000
--- a/lib/presentation/Screens/Bottom Navigation Pages/country_profile.dart
+++ /dev/null
@@ -1,31 +0,0 @@
-import 'package:flutter/material.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) {
- return Center(child: Text("COuntry Profile"),);
- }
-}
-
-
-
diff --git a/lib/presentation/routes/bottom_bar_routes/tab_routes/home_route.dart b/lib/presentation/routes/bottom_bar_routes/tab_routes/home_route.dart
index a2a7dcca..9779c61f 100644
--- a/lib/presentation/routes/bottom_bar_routes/tab_routes/home_route.dart
+++ b/lib/presentation/routes/bottom_bar_routes/tab_routes/home_route.dart
@@ -191,11 +191,11 @@ class _MyHomePageState extends State {
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')))),
+ mycenterTitle: true,
+ title: SizedBox(
+ height: myheight / 5,
+ width: mywidth / 3,
+ child: Image(image: AssetImage('assets/logos/uae_stat.png'))),
body: EconomyStats(),
);
}
diff --git a/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/custom_text.dart b/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/custom_text.dart
index 5abc4efd..a20db95f 100644
--- a/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/custom_text.dart
+++ b/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/custom_text.dart
@@ -1,64 +1,56 @@
import 'package:flutter/material.dart';
-class CustomContainer extends StatelessWidget {
- final String text;
- final EdgeInsetsGeometry padding;
- final bool isBulletPoint;
- final TextStyle? textStyle;
- final double? fontSize;
- final double? height;
- final double defaultFontSize ;
- final TextDecoration textDecoration ;
- final Color? decorationColor;
- final FontWeight fontWeight;
- final Color color;
+class CustomTextRich extends StatelessWidget {
- const CustomContainer({
+ const CustomTextRich({
super.key,
- required this.text,
+ required this.textSpans,
this.padding = const EdgeInsets.all(8.0),
- this.isBulletPoint = false,
- this.textStyle,
- this.fontSize,
- this.defaultFontSize=14,
- this.height,
- this.textDecoration = TextDecoration.none,
- this.fontWeight =FontWeight.w500,
- this.decorationColor,
- this.color=const Color(0xFF898C81),
+ this.textAlign = TextAlign.left,
});
-
+ final List textSpans;
+ final EdgeInsetsGeometry padding;
+ final TextAlign textAlign;
@override
Widget build(BuildContext context) {
- return Padding(
- padding: padding,
- child: Row(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- if (isBulletPoint)
- Text(
- "• ",
+ return SingleChildScrollView(
+ child :Padding(
+ padding: padding,
+ child: Text.rich(
+ TextSpan(children: textSpans),
+ textAlign: textAlign,
+ ),
+ ),
+ );
- style: TextStyle(fontSize: fontSize ?? defaultFontSize,
- color: color,
- fontWeight: fontWeight,
- height: height,),
- ),
- Expanded(
- child: Text(
- text,
- style: TextStyle(
- fontSize: fontSize ?? defaultFontSize,
- color: color,
- fontWeight: fontWeight,
- height: height,
- decoration: textDecoration,
- decorationColor: decorationColor ?? color,
- ),
- ),
- ),
- ],
+
+ }
+
+ static TextSpan createTextSpan(
+ String text, {
+ double? fontSize,
+ Color color = const Color(0xFF898C81),
+ FontWeight fontWeight = FontWeight.w500,
+ double? height,
+ double defaultFontSize = 14,
+ TextDecoration textDecoration = TextDecoration.none,
+ Color? decorationColor,
+ double spacingTop = 0.0,
+ double spacingBottom = 0.0,
+ }) {
+ String spacedText = (spacingTop > 0.0 || spacingBottom > 0.0)
+ ? '${'\n' * spacingTop.toInt()}$text${'\n' * spacingBottom.toInt()}'
+ : text;
+ return TextSpan(
+ text: spacedText,
+ style: TextStyle(
+ fontSize: fontSize ?? defaultFontSize,
+ color: color,
+ fontWeight: fontWeight,
+ height: height,
+ decoration: textDecoration,
+ decorationColor: decorationColor ?? color,
),
);
}
diff --git a/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/faq_page.dart b/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/faq_page.dart
index ad39293c..880584e7 100644
--- a/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/faq_page.dart
+++ b/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/faq_page.dart
@@ -1,6 +1,6 @@
import 'package:flutter/material.dart';
-import '../../custom_drawer_routes.dart';
+import 'package:uae_stat/presentation/routes/drawer_routes/custom_drawer_routes.dart';
class FAQPage extends StatefulWidget {
const FAQPage({super.key});
@@ -13,38 +13,63 @@ class _FAQPageState extends State {
@override
Widget build(BuildContext context) {
return BaseScaffold(
- title: Text('FAQs'),
- body: Scrollbar(
- thumbVisibility: true,
- thickness: 6,
- radius: Radius.circular(10),
- interactive: true,
- child:SingleChildScrollView(
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.start,
+ title: Text('FAQs',
+ style: TextStyle(
+ color:Color(0xFF7296BE),
+ fontWeight: FontWeight.w500,
+ ),),
+ showBackButton: true,
+ body: SafeArea(child:Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Container(
+ padding: const EdgeInsets.all(16.0),
+ width: MediaQuery.of(context).size.width,
+ child: Text.rich(
+ TextSpan(
+ text: 'Here are some common questions about the ',
+ style: TextStyle(
+ fontSize: 19,
+ fontWeight: FontWeight.w600,
+ color: Colors.grey,
+ ),
children: [
- Container(
- padding: const EdgeInsets.all(16.0),
- width: MediaQuery.of(context).size.width,
- child: Text(
- 'HERE ARE SOME COMMON QUESTIONS ABOUT THE FEDERAL COMPETITIVENESS AND STATISTICS CENTRE (FCSC) MOBILE APPLICATION:',
- style: TextStyle(
- color: Color(0xFF265E84), // Text color
- fontSize: 18,
- fontWeight: FontWeight.w600
- ),
+ TextSpan(
+ text:' Federal Competitiveness and Statistics Centre (FCSC),',
+ style: TextStyle(
+ fontSize: 19,
+ fontWeight: FontWeight.w600,
+ color: Colors.black87,
+ ),
+ ),
+ TextSpan(
+ text: 'mobile application:',
+ style: TextStyle(
+ fontSize: 19,
+ fontWeight: FontWeight.w600,
+ color: Colors.grey,
),
),
- Container(
- padding: const EdgeInsets.all(0.0),
- color: Colors.grey,
- child: QuestionAnswerScrollView()
- )
],
),
),
),
-
+ Expanded(child: Scrollbar(
+ thumbVisibility: true,
+ thickness: 8,
+ radius: Radius.circular(10),
+ interactive: true,
+ child:SingleChildScrollView(
+ child:Container(
+ padding: const EdgeInsets.all(0.0),
+ color: Colors.grey[50],
+ child: QuestionAnswerScrollView(),
+ ),
+ ),
+ ),),
+ ],
+ ),
+ ),
);
}
@@ -52,24 +77,194 @@ class _FAQPageState extends State {
}
class QuestionAnswerScrollView extends StatelessWidget {
- final List