From ffb2a6baf3d426baca28c75afad673ee25e3d662 Mon Sep 17 00:00:00 2001 From: venbaittech Date: Fri, 7 Feb 2025 12:30:59 +0530 Subject: [PATCH] back button changes --- lib/config/my_router.dart | 123 +- .../Competitiveness/competitiveness.dart | 28 +- .../Country_Profile/country_profile.dart | 119 +- .../UAE_Numbers/uae_numbers.dart | 49 +- .../routes/auth_routes/login_route.dart | 6 +- .../auth_routes/pocketbase_service.dart | 66 - .../drawer_routes/Drawer Items/bookmark.dart | 56 +- .../Drawer Items/edit_profile.dart | 1123 +++++++++-------- .../drawer_routes/Drawer Items/feedback.dart | 137 +- .../Drawer Items/manage_users.dart | 244 ++-- .../user_guide/AboutTheApp/AboutFCSC.dart | 145 ++- .../user_guide/AboutTheApp/getStarted.dart | 226 ++-- .../user_guide/KeyFeatures/AppFeatures.dart | 147 ++- .../KeyFeatures/ChangeMyPassword.dart | 195 +-- .../user_guide/KeyFeatures/EditMyProfile.dart | 430 ++++--- .../user_guide/KeyFeatures/howUseTheApp.dart | 110 +- .../user_guide/KeyFeatures/purpose.dart | 96 +- .../user_guide/KeyFeatures/stayUpdate.dart | 64 +- .../user_guide/KeyFeatures/useTheApp.dart | 81 +- .../Drawer Items/user_guide/aboutApp.dart | 123 +- .../Drawer Items/user_guide/faq_page.dart | 478 ++++--- .../Drawer Items/user_guide/features.dart | 134 +- .../drawer_routes/custom_drawer_routes.dart | 35 +- pubspec.yaml | 2 + 24 files changed, 2266 insertions(+), 1951 deletions(-) delete mode 100644 lib/presentation/routes/auth_routes/pocketbase_service.dart diff --git a/lib/config/my_router.dart b/lib/config/my_router.dart index 5a8b1bfd..731091d5 100644 --- a/lib/config/my_router.dart +++ b/lib/config/my_router.dart @@ -301,7 +301,6 @@ import 'package:uae_stat/presentation/Screens/charts/chart.dart'; import 'package:uae_stat/presentation/Screens/charts/screens/chart_screen.dart'; import 'package:uae_stat/presentation/Screens/demo_home2.dart'; import 'package:uae_stat/presentation/Screens/online_offline_verification/internet_check.dart'; -import 'package:uae_stat/presentation/routes/auth_routes/pocketbase_service.dart'; import 'package:uae_stat/presentation/routes/drawer_routes/Drawer%20Items/user_guide/AboutTheApp/AboutFCSC.dart'; import 'package:uae_stat/presentation/routes/drawer_routes/Drawer%20Items/user_guide/AboutTheApp/getStarted.dart'; import 'package:uae_stat/presentation/routes/drawer_routes/Drawer%20Items/user_guide/KeyFeatures/AppFeatures.dart'; @@ -335,7 +334,6 @@ import '../presentation/routes/drawer_routes/Drawer Items/user_guide/faq_page.da import '../presentation/routes/drawer_routes/Drawer Items/user_guide/features.dart'; import '../presentation/routes/drawer_routes/Drawer Items/manage_users.dart'; -final pbService = PocketBaseService(); final FlutterSecureStorage _secureStorage = const FlutterSecureStorage(); Future _checkSession() async { @@ -364,7 +362,7 @@ final GoRouter router = GoRouter( // ), GoRoute( path: '/', - redirect: (context, state) async => await _checkSession(), + redirect: (context, state) async => await _checkSession(), ), GoRoute( path: '/internetcheck', @@ -474,75 +472,74 @@ final GoRouter router = GoRouter( return ProfileScreen(userId: userId); }, ), -GoRoute( - path: '/user-guide', - builder: (context, state) => Userguide(), - routes: [ GoRoute( - path: '/features', - name: 'features', - builder: (context, state) => UsingFeatures(), + path: '/user-guide', + builder: (context, state) => Userguide(), routes: [ GoRoute( - path: 'whoUseApp', - name: 'whoUseApp', - builder: (context, state) => WhoUseTheApp(), + path: '/features', + name: 'features', + builder: (context, state) => UsingFeatures(), + routes: [ + GoRoute( + path: 'whoUseApp', + name: 'whoUseApp', + builder: (context, state) => WhoUseTheApp(), + ), + GoRoute( + path: 'howUseApp', + name: 'howUseApp', + builder: (context, state) => HowUseTheApp(), + ), + GoRoute( + path: 'purpose', + name: 'purpose', + builder: (context, state) => Purpose(), + ), + GoRoute( + path: 'stayUpdated', + name: 'stayUpdated', + builder: (context, state) => StayUpdate(), + ), + GoRoute( + path: 'changeMyPassword', + name: 'changeMyPassword', + builder: (context, state) => ChangeMyPassword(), + ), + GoRoute( + path: 'appFeatures', + name: 'appFeatures', + builder: (context, state) => AppFeatures(), + ), + GoRoute( + path: 'editMyProfile', + name: 'editMyProfile', + builder: (context, state) => EditMyProfile(), + ), + ], ), GoRoute( - path: 'howUseApp', - name: 'howUseApp', - builder: (context, state) => HowUseTheApp(), - ), + path: 'aboutApp', + builder: (context, state) => aboutTheApp(), + routes: [ + GoRoute( + path: 'aboutFCSC', + name: 'aboutFCSC', + builder: (context, state) => aboutFCSC(), + ), + GoRoute( + path: 'getStarted', + name: 'getStarted', + builder: (context, state) => GetStarted(), + ), + ]), GoRoute( - path: 'purpose', - name: 'purpose', - builder: (context, state) => Purpose(), - ), - GoRoute( - path: 'stayUpdated', - name: 'stayUpdated', - builder: (context, state) => StayUpdate(), - ), - GoRoute( - path: 'changeMyPassword', - name: 'changeMyPassword', - builder: (context, state) => ChangeMyPassword(), - ), - GoRoute( - path: 'appFeatures', - name: 'appFeatures', - builder: (context, state) => AppFeatures(), - ), - GoRoute( - path: 'editMyProfile', - name: 'editMyProfile', - builder: (context, state) => EditMyProfile(), + path: '/faq', + name: 'faq', + builder: (context, state) => FAQPage(), ), ], ), - GoRoute( - path: 'aboutApp', - builder: (context, state) => aboutTheApp(), - routes: [ - GoRoute( - path: 'aboutFCSC', - name: 'aboutFCSC', - builder: (context, state) => aboutFCSC(), - ), - GoRoute( - path: 'getStarted', - name: 'getStarted', - builder: (context, state) => GetStarted(), - ), - ] - ), - GoRoute( - path: '/faq', - name: 'faq', - builder: (context, state) => FAQPage(), - ), - ], -), // GoRoute( // path: '/manageuser', // builder: (context, state) { diff --git a/lib/presentation/Screens/Bottom Navigation Pages/Competitiveness/competitiveness.dart b/lib/presentation/Screens/Bottom Navigation Pages/Competitiveness/competitiveness.dart index 1ba3fb58..57ec518d 100644 --- a/lib/presentation/Screens/Bottom Navigation Pages/Competitiveness/competitiveness.dart +++ b/lib/presentation/Screens/Bottom Navigation Pages/Competitiveness/competitiveness.dart @@ -1,4 +1,5 @@ import 'package:flutter/material.dart'; +import 'package:go_router/go_router.dart'; import 'package:uae_stat/presentation/routes/drawer_routes/custom_drawer_routes.dart'; class Competitiveness extends StatelessWidget { @@ -8,16 +9,23 @@ class Competitiveness extends StatelessWidget { 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), + return PopScope( + onPopInvokedWithResult: (didPop, result) { + if (didPop) return; + context.go('/myhomepage'); + }, + child: 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"));} + + Widget CompetitivenessState(BuildContext context) { + return Center(child: Text("Competitiveness")); + } } - - diff --git a/lib/presentation/Screens/Bottom Navigation Pages/Country_Profile/country_profile.dart b/lib/presentation/Screens/Bottom Navigation Pages/Country_Profile/country_profile.dart index 58a1c5ae..a08720a0 100644 --- a/lib/presentation/Screens/Bottom Navigation Pages/Country_Profile/country_profile.dart +++ b/lib/presentation/Screens/Bottom Navigation Pages/Country_Profile/country_profile.dart @@ -1,4 +1,5 @@ import 'package:flutter/material.dart'; +import 'package:go_router/go_router.dart'; import 'package:uae_stat/presentation/routes/drawer_routes/custom_drawer_routes.dart'; import 'package:fl_chart/fl_chart.dart'; @@ -9,16 +10,23 @@ class CountryProfile extends StatelessWidget { 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(), + return PopScope( + onPopInvokedWithResult: (didPop, result) { + if (didPop) return; + context.go('/myhomepage'); + }, + child: 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}); @@ -28,99 +36,20 @@ class CountryProfileWidget extends StatelessWidget { } } - - - - 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')), + // 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, - ), - ], - ), - ), - ), - ), - ), - ), - ), + padding: const EdgeInsets.all(16.0), + child: Center( + child: Text('Coming Soon'), + )), ); } } @@ -129,14 +58,6 @@ void main() { runApp(MaterialApp(home: HorizontalBarChart())); } - // void main() { // runApp(MaterialApp(home: HorizontalBarChart())); // } - - - - - - - diff --git a/lib/presentation/Screens/Bottom Navigation Pages/UAE_Numbers/uae_numbers.dart b/lib/presentation/Screens/Bottom Navigation Pages/UAE_Numbers/uae_numbers.dart index c5bd1e8a..989d5a05 100644 --- a/lib/presentation/Screens/Bottom Navigation Pages/UAE_Numbers/uae_numbers.dart +++ b/lib/presentation/Screens/Bottom Navigation Pages/UAE_Numbers/uae_numbers.dart @@ -12,16 +12,33 @@ import 'package:http/http.dart' as http; 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() + // uaenumberWidget()); + // } + @override Widget build(BuildContext context) { double myheight = MediaQuery.of(context).size.height; double mywidth = MediaQuery.of(context).size.width; - return BaseScaffold( + + return PopScope( + onPopInvokedWithResult: (didPop, result) { + if (didPop) return; + context.go('/myhomepage'); + }, + child: BaseScaffold( title: Text("UAE Numbers"), - body: - //EconomicDashboard(), - //EconomyExpandTile() - uaenumberWidget()); + body: uaenumberWidget(), + ), + ); } } @@ -81,15 +98,18 @@ class _UaenumberWidgetState extends ConsumerState { children: [ Container( decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(30.0), - border: Border.all(width: 1,color: Color(0xFFAA8E83)),), + color: Colors.white, + borderRadius: BorderRadius.circular(30.0), + border: Border.all(width: 1, color: Color(0xFFAA8E83)), + ), child: TextField( decoration: InputDecoration( hintText: "Search", - prefixIcon: Icon(Icons.search, - color: Color(0xFFAA8E83),), - border: InputBorder.none, + prefixIcon: Icon( + Icons.search, + color: Color(0xFFAA8E83), + ), + border: InputBorder.none, contentPadding: EdgeInsets.symmetric(vertical: 15.0, horizontal: 20.0), ), @@ -109,7 +129,7 @@ class _UaenumberWidgetState extends ConsumerState { return CustomExpandableTile( index: index, -isExpanded: expandedIndex == index, // Compare with expandedIndex + isExpanded: expandedIndex == index, // Compare with expandedIndex onTap: (index) { setState(() { expandedIndex = (expandedIndex == index) ? null : index; @@ -297,7 +317,6 @@ class CustomExpandableTile extends StatefulWidget { final bool isExpanded; final ValueChanged onTap; - const CustomExpandableTile({ required this.title, required this.titleBackgroundColor, @@ -305,7 +324,6 @@ class CustomExpandableTile extends StatefulWidget { required this.index, required this.isExpanded, required this.onTap, - }); @override @@ -329,8 +347,7 @@ class _CustomExpandableTileState extends State { child: Column( children: [ GestureDetector( - onTap: () => widget.onTap(widget.index), - + onTap: () => widget.onTap(widget.index), child: Container( decoration: BoxDecoration( color: widget.titleBackgroundColor, diff --git a/lib/presentation/routes/auth_routes/login_route.dart b/lib/presentation/routes/auth_routes/login_route.dart index 05124003..65eb6226 100644 --- a/lib/presentation/routes/auth_routes/login_route.dart +++ b/lib/presentation/routes/auth_routes/login_route.dart @@ -20,7 +20,6 @@ import 'package:uae_stat/presentation/components/lang_toggle.dart'; import 'package:uae_stat/presentation/components/my_bottom_nav_bar.dart'; import 'package:uae_stat/presentation/components/space.dart'; import 'package:uae_stat/presentation/components/themed_text_field.dart'; -import 'package:uae_stat/presentation/routes/auth_routes/pocketbase_service.dart'; import 'package:uae_stat/presentation/routes/bottom_bar_routes/tab_routes/home_route.dart'; import 'package:http/http.dart' as http; import '../../Screens/auth_verification/registration.dart'; @@ -32,7 +31,6 @@ import '../../components/my_toggle.dart'; class LoginRoute extends HookConsumerWidget { final pb = PocketBase('https://pb.venbait.in'); final FlutterSecureStorage _secureStorage = const FlutterSecureStorage(); - final _pbService = PocketBaseService(); // final _pb = PocketBase('http://127.0.0.1:8090'); // final bool isLoginScreen; // Pass `true` if this is the login screen // LoginRoute({Key? key, required this.isLoginScreen}) : super(key: key); @@ -241,13 +239,13 @@ class LoginRoute extends HookConsumerWidget { ), ); }, - style: TextButton.styleFrom( + style: TextButton.styleFrom( padding: EdgeInsets.zero, // maximumSize: Size.zero, tapTargetSize: MaterialTapTargetSize.shrinkWrap, visualDensity: VisualDensity.compact, overlayColor: Colors.white - ), + ), child: Text( context.translate( 'Forgot Password?', diff --git a/lib/presentation/routes/auth_routes/pocketbase_service.dart b/lib/presentation/routes/auth_routes/pocketbase_service.dart deleted file mode 100644 index 8e5cc2c8..00000000 --- a/lib/presentation/routes/auth_routes/pocketbase_service.dart +++ /dev/null @@ -1,66 +0,0 @@ -import 'package:pocketbase/pocketbase.dart'; -import 'package:shared_preferences/shared_preferences.dart'; - -class PocketBaseService { - final PocketBase pb = PocketBase('https://pb.venbait.in'); - - // Save session to local storage - Future saveSession() async { - final prefs = await SharedPreferences.getInstance(); - await prefs.setString('pb_auth', pb.authStore.token); - await prefs.setString('pb_user', pb.authStore.model.toJson()); - await prefs.setInt('pb_auth_time', DateTime.now().millisecondsSinceEpoch); - } - - // Load session from local storage - Future loadSession() async { - final prefs = await SharedPreferences.getInstance(); - final token = prefs.getString('pb_auth'); - final userJson = prefs.getString('pb_user'); - - if (token != null && userJson != null) { - pb.authStore - .save(token, RecordModel.fromJson(userJson as Map)); - - if (!pb.authStore.isValid || isSessionExpired(prefs)) { - await clearSession(); - return false; - } - return true; - } - return false; - } - - // Check if the session is expired (4 days) - bool isSessionExpired(SharedPreferences prefs) { - final savedTime = prefs.getInt('pb_auth_time') ?? 0; - final currentTime = DateTime.now().millisecondsSinceEpoch; - const sessionDuration = Duration(days: 4); - return (currentTime - savedTime) > sessionDuration.inMilliseconds; - } - - // User login - Future loginUser(String email, String password) async { - try { - await pb.collection('users').authWithPassword(email, password); - await saveSession(); - return true; - } catch (e) { - return false; - } - } - - // User logout - Future logoutUser() async { - pb.authStore.clear(); - await clearSession(); - } - - // Clear session from local storage - Future clearSession() async { - final prefs = await SharedPreferences.getInstance(); - await prefs.remove('pb_auth'); - await prefs.remove('pb_user'); - await prefs.remove('pb_auth_time'); - } -} diff --git a/lib/presentation/routes/drawer_routes/Drawer Items/bookmark.dart b/lib/presentation/routes/drawer_routes/Drawer Items/bookmark.dart index 75e2ccbd..395a8363 100644 --- a/lib/presentation/routes/drawer_routes/Drawer Items/bookmark.dart +++ b/lib/presentation/routes/drawer_routes/Drawer Items/bookmark.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:go_router/go_router.dart'; import 'package:uae_stat/presentation/routes/drawer_routes/custom_drawer_routes.dart'; - class BookMark extends ConsumerStatefulWidget { const BookMark({super.key}); @@ -59,23 +59,29 @@ class _BookMarkState extends ConsumerState { @override Widget build(BuildContext context) { - final filteredList = dataList.where((item) => item['isBookmark'] == true) - .toList(); - return BaseScaffold( - title: Text('Bookmark'), - body: Padding( - padding: const EdgeInsets.all(8.0), - child: GridView.builder( - gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( - crossAxisCount: 2, // Two columns - crossAxisSpacing: 10.0, - mainAxisSpacing: 10.0, - mainAxisExtent: 100, + final filteredList = + dataList.where((item) => item['isBookmark'] == true).toList(); + return PopScope( + onPopInvokedWithResult: (didPop, result) { + if (didPop) return; + context.go('/myhomepage'); + }, + child: BaseScaffold( + title: Text('Bookmark'), + body: Padding( + padding: const EdgeInsets.all(8.0), + child: GridView.builder( + gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( + crossAxisCount: 2, // Two columns + crossAxisSpacing: 10.0, + mainAxisSpacing: 10.0, + mainAxisExtent: 100, + ), + itemCount: filteredList.length, + itemBuilder: (context, index) { + return _buildBox(filteredList[index], context); + }, ), - itemCount: filteredList.length, - itemBuilder: (context, index) { - return _buildBox(filteredList[index], context); - }, ), ), ); @@ -88,10 +94,7 @@ class _BookMarkState extends ConsumerState { debugPrint("Box clicked: ${data['title']}"); }, child: Container( - width: MediaQuery - .of(context) - .size - .width * 0.4, + width: MediaQuery.of(context).size.width * 0.4, height: 100, padding: EdgeInsets.all(8.0), decoration: BoxDecoration( @@ -131,14 +134,16 @@ class _BookMarkState extends ConsumerState { setState(() { // Change isOpen to false when icon is clicked int index = dataList.indexWhere( - (item) => item['title'] == data['title'],); + (item) => item['title'] == data['title'], + ); if (index != -1) { dataList[index]['isBookmark'] = false; ScaffoldMessenger.of(context).showSnackBar( SnackBar( content: Text( 'Removed From Bookmark', - style: TextStyle(color: Color(0xFF2F692C), + style: TextStyle( + color: Color(0xFF2F692C), fontWeight: FontWeight.w600), ), backgroundColor: Color(0xFFD6E9C6), @@ -150,7 +155,8 @@ class _BookMarkState extends ConsumerState { SnackBar( content: Text( 'Failed to Remove', - style: TextStyle(color: Color(0xFFEB5F24), + style: TextStyle( + color: Color(0xFFEB5F24), fontWeight: FontWeight.w600), ), backgroundColor: Color(0xFF544C4C), @@ -191,4 +197,4 @@ class _BookMarkState extends ConsumerState { ), ); } -} \ No newline at end of file +} diff --git a/lib/presentation/routes/drawer_routes/Drawer Items/edit_profile.dart b/lib/presentation/routes/drawer_routes/Drawer Items/edit_profile.dart index 55d92b96..0e4b8d51 100644 --- a/lib/presentation/routes/drawer_routes/Drawer Items/edit_profile.dart +++ b/lib/presentation/routes/drawer_routes/Drawer Items/edit_profile.dart @@ -77,7 +77,7 @@ class _EditProfileState extends State { dynamic collectionId; dynamic role; - bool _isHoveringDropdown = false; + bool _isHoveringDropdown = false; @override void initState() { @@ -424,585 +424,608 @@ class _EditProfileState extends State { @override Widget build(BuildContext context) { - return BaseScaffold( - title: Text(AppLocalizations.of(context)!.my_profile, - style: TextStyle(color: Color(0xFF985400)),), - body: SingleChildScrollView( - child: Padding( - padding: const EdgeInsets.only(left: 10.0, right: 10.0, top: 3.0), - child: Column( - children: [ - SingleChildScrollView( - child: Form( - key: _formKey, - child: Padding( - // padding: const EdgeInsets.all(20.0), -padding: const EdgeInsets.only( - top: 20.0, bottom: 20.0, left: 25, right: 25), - child: isPageLoad - ? Center( - child: CircularProgressIndicator(), - ) - : Column( - children: [ - // CircleAvatar( - // radius: 50, - // backgroundImage: _profileImage != null - // ? FileImage( - // _profileImage!) // If a local file is selected - // : _avatarUrl.isNotEmpty - // ? NetworkImage(_avatarUrl) // Load from URL - // : AssetImage( - // "assets/edit_profile/profile.png") - // as ImageProvider, - // - // //backgroundImage: NetworkImage(_avatarUrl) as ImageProvider, - // - // child: - // Align( - // alignment: Alignment.bottomRight, - // child: GestureDetector( - // onTap: _pickImage, // Call `_pickImage` on tap - // child: CircleAvatar( - // radius: 15, - // backgroundColor: Colors.white, - // child: Icon( - // Icons.camera_alt, - // size: 15, - // color: Colors.grey, - // ), - // ), - // ), - // ), - // ), - - // Stack( - // alignment: Alignment.center, - // children: [ - // // FutureBuilder to load the image - // FutureBuilder( - // future: _loadProfileImage(), - // builder: (context, snapshot) { - // if (snapshot.connectionState == ConnectionState.waiting) { - // // While the image is loading, show a progress indicator - // return CircleAvatar( - // radius: 50, - // child: CircularProgressIndicator(), - // ); - // } else if (snapshot.hasError || snapshot.data == null) { - // // If there's an error or no image, show an error icon - // return CircleAvatar( - // radius: 50, - // child: CircularProgressIndicator(), - // ); - // } else { - // // Display the loaded image - // return CircleAvatar( - // radius: 50, - // backgroundImage: snapshot.data, - // child: Align( - // alignment: Alignment.bottomRight, - // child: GestureDetector( - // onTap: _pickImage, - // child: CircleAvatar( - // radius: 15, - // backgroundColor: Colors.white, - // child: Icon( - // Icons.camera_alt, - // size: 15, - // color: Colors.grey, - // ), - // ), - // ), - // ), - // ); - // } - // }, - // ), - // ], - // ), - - Stack( - alignment: Alignment.center, + return PopScope( + onPopInvokedWithResult: (didPop, result) { + if (didPop) return; + context.go('/myhomepage'); + }, + child: BaseScaffold( + title: Text( + AppLocalizations.of(context)!.my_profile, + style: TextStyle(color: Color(0xFF985400)), + ), + body: SingleChildScrollView( + child: Padding( + padding: const EdgeInsets.only(left: 10.0, right: 10.0, top: 3.0), + child: Column( + children: [ + SingleChildScrollView( + child: Form( + key: _formKey, + child: Padding( + // padding: const EdgeInsets.all(20.0), + padding: const EdgeInsets.only( + top: 20.0, bottom: 20.0, left: 25, right: 25), + child: isPageLoad + ? Center( + child: CircularProgressIndicator(), + ) + : Column( children: [ - CircleAvatar( - radius: 50, - backgroundImage: _profileImage != null - ? FileImage( - _profileImage!) // If a local file is selected - : _avatarUrl.isNotEmpty - ? NetworkImage( - _avatarUrl) // Load from URL - : AssetImage( - 'assets/edit_profile/profile.png') - as ImageProvider, - child: _avatarUrl.isNotEmpty - ? FutureBuilder( - future: _loadImage(_avatarUrl), - builder: (context, snapshot) { - if (snapshot.connectionState == - ConnectionState.waiting) { - return Center( - child: - CircularProgressIndicator(), - ); - } else if (snapshot.hasError) { - return Center( - child: Icon(Icons.error), - ); - } else { - return Align( - alignment: - Alignment.bottomRight, - child: GestureDetector( - onTap: - _pickImage, // Call `_pickImage` on tap - child: CircleAvatar( - radius: 15, - backgroundColor: - Colors.white, - child: Icon( - Icons.camera_alt, - size: 15, - color: Colors.grey, + // CircleAvatar( + // radius: 50, + // backgroundImage: _profileImage != null + // ? FileImage( + // _profileImage!) // If a local file is selected + // : _avatarUrl.isNotEmpty + // ? NetworkImage(_avatarUrl) // Load from URL + // : AssetImage( + // "assets/edit_profile/profile.png") + // as ImageProvider, + // + // //backgroundImage: NetworkImage(_avatarUrl) as ImageProvider, + // + // child: + // Align( + // alignment: Alignment.bottomRight, + // child: GestureDetector( + // onTap: _pickImage, // Call `_pickImage` on tap + // child: CircleAvatar( + // radius: 15, + // backgroundColor: Colors.white, + // child: Icon( + // Icons.camera_alt, + // size: 15, + // color: Colors.grey, + // ), + // ), + // ), + // ), + // ), + + // Stack( + // alignment: Alignment.center, + // children: [ + // // FutureBuilder to load the image + // FutureBuilder( + // future: _loadProfileImage(), + // builder: (context, snapshot) { + // if (snapshot.connectionState == ConnectionState.waiting) { + // // While the image is loading, show a progress indicator + // return CircleAvatar( + // radius: 50, + // child: CircularProgressIndicator(), + // ); + // } else if (snapshot.hasError || snapshot.data == null) { + // // If there's an error or no image, show an error icon + // return CircleAvatar( + // radius: 50, + // child: CircularProgressIndicator(), + // ); + // } else { + // // Display the loaded image + // return CircleAvatar( + // radius: 50, + // backgroundImage: snapshot.data, + // child: Align( + // alignment: Alignment.bottomRight, + // child: GestureDetector( + // onTap: _pickImage, + // child: CircleAvatar( + // radius: 15, + // backgroundColor: Colors.white, + // child: Icon( + // Icons.camera_alt, + // size: 15, + // color: Colors.grey, + // ), + // ), + // ), + // ), + // ); + // } + // }, + // ), + // ], + // ), + + Stack( + alignment: Alignment.center, + children: [ + CircleAvatar( + radius: 50, + backgroundImage: _profileImage != null + ? FileImage( + _profileImage!) // If a local file is selected + : _avatarUrl.isNotEmpty + ? NetworkImage( + _avatarUrl) // Load from URL + : AssetImage( + 'assets/edit_profile/profile.png') + as ImageProvider, + child: _avatarUrl.isNotEmpty + ? FutureBuilder( + future: _loadImage(_avatarUrl), + builder: (context, snapshot) { + if (snapshot + .connectionState == + ConnectionState.waiting) { + return Center( + child: + CircularProgressIndicator(), + ); + } else if (snapshot + .hasError) { + return Center( + child: Icon(Icons.error), + ); + } else { + return Align( + alignment: + Alignment.bottomRight, + child: GestureDetector( + onTap: + _pickImage, // Call `_pickImage` on tap + child: CircleAvatar( + radius: 15, + backgroundColor: + Colors.white, + child: Icon( + Icons.camera_alt, + size: 15, + color: Colors.grey, + ), + ), ), + ); + } + }, + ) + : Align( + alignment: + Alignment.bottomRight, + child: GestureDetector( + onTap: + _pickImage, // Call `_pickImage` on tap + child: CircleAvatar( + radius: 15, + backgroundColor: + Colors.white, + child: Icon( + Icons.camera_alt, + size: 15, + color: Colors.grey, ), ), - ); - } - }, - ) - : Align( - alignment: Alignment.bottomRight, - child: GestureDetector( - onTap: - _pickImage, // Call `_pickImage` on tap - child: CircleAvatar( - radius: 15, - backgroundColor: Colors.white, - child: Icon( - Icons.camera_alt, - size: 15, - color: Colors.grey, ), ), + ), + if (_isLoading) + Positioned( + child: CircularProgressIndicator( + strokeWidth: 2, + valueColor: + AlwaysStoppedAnimation( + Colors.grey, ), ), + ), + ], ), - if (_isLoading) - Positioned( - child: CircularProgressIndicator( - strokeWidth: 2, - valueColor: - AlwaysStoppedAnimation( - Colors.grey, + + SizedBox(height: 20), + Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Text( + AppLocalizations.of(context)! + .register_name, + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w500, + color: Colors.grey, ), ), - ), - ], - ), - - SizedBox(height: 20), - Row( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - Text( - AppLocalizations.of(context)!.register_name, - style: TextStyle( - fontSize: 16, - fontWeight: FontWeight.w500, - color: Colors.grey, - ), + ], ), - ], - ), - SizedBox(height: 10), - TextFormField( - controller: _usernameController, - focusNode: _focusNodes[0], - decoration: InputDecoration( - // hintText: _showHints[0] ? 'Mohammad Hassan' : null, - hintStyle: TextStyle(color: Colors.grey), - border: OutlineInputBorder( - borderRadius: BorderRadius.circular(8), - ), - enabled: false, - ), - ), - SizedBox(height: 10), - Row( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - Text( - AppLocalizations.of(context)!.email_id, - style: TextStyle( - fontSize: 16, - fontWeight: FontWeight.w500, - color: Colors.grey, - ), - ), - ], - ), - SizedBox(height: 10), - TextFormField( - controller: _emailController, - focusNode: _focusNodes[1], - decoration: InputDecoration( - // hintText: _showHints[1]? 'mohammad.hassan@fcsc.gov.ae': null, - border: OutlineInputBorder( - borderRadius: BorderRadius.circular(8), - ), - enabled: false, - ), - ), - SizedBox(height: 10), - Row( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - Text( - AppLocalizations.of(context)!.full_name, - style: TextStyle( - fontSize: 16, - fontWeight: FontWeight.w500, - color: Colors.grey, - ), - ), - ], - ), - SizedBox(height: 10), - TextFormField( - enabled: false, - validator: (value) { - if (value == null || value.isEmpty) { - return 'Required'; - } - - //RegExp(r"^[a-zA-Z\s]+$"); - final nameRegex = RegExp( - r"^[a-zA-Z0-9'\-\u0627\u0639~\u00C0-\u00FF\s]+$", - ); - if (!nameRegex.hasMatch(value)) { - return 'Invalid Characters'; - } - return null; - }, - controller: _fullNameController, - focusNode: _focusNodes[2], - decoration: InputDecoration( - // hintText: _showHints[2] ? 'Mohammad' : null, - hintStyle: TextStyle(color: Colors.grey), - border: OutlineInputBorder( - borderRadius: BorderRadius.circular(8), - ), - // counterText: '', - enabled: !_isProfileCompleted, - ), - maxLength: - 40, // Set the maximum length to 20 characters - maxLengthEnforcement: - MaxLengthEnforcement.enforced, - ), - SizedBox(height: 10), - Row( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - Text( - AppLocalizations.of(context)!.dob, - style: TextStyle( - fontSize: 16, - fontWeight: FontWeight.w500, - color: Colors.grey, - ), - ), - ], - ), - SizedBox(height: 10), - TextFormField( - controller: _dateController, - focusNode: _focusNodes[3], - decoration: InputDecoration( - border: OutlineInputBorder( - borderRadius: BorderRadius.circular(8), - ), - // hintText: _showHints[3] ? 'Select your Date of Birth' : null, - hintStyle: TextStyle(color: Colors.grey), - suffixIcon: Container( - width: 45, - padding: EdgeInsets.only(right: 1), - alignment: Alignment - .center, // Center the icon vertically - child: Icon( - Icons.keyboard_arrow_down_sharp, - color: Colors.grey, - ), - ), - enabled: !_isProfileCompleted, - ), - readOnly: true, - onTap: _pickDate, - validator: _validateDob, - ), - SizedBox(height: 10), - Row( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - Text( - AppLocalizations.of(context)!.region, - style: TextStyle( - fontSize: 16, - fontWeight: FontWeight.w500, - ), - ), - ], - ), - SizedBox(height: 10), - MouseRegion( - onEnter: (_) => - setState(() => _isHoveringDropdown = true), - onExit: (_) => - setState(() => _isHoveringDropdown = false), - child: DropdownButtonFormField( - value: _selectedCountry, - decoration: InputDecoration( - border: OutlineInputBorder( - borderRadius: BorderRadius.circular(8), - ), - labelText: 'Select', - ), - icon: Icon(Icons.keyboard_arrow_down_sharp, - color: _isHoveringDropdown - ? Colors.black - : Colors.grey), - items: _countries - .map( - (item) => DropdownMenuItem( - value: item, - child: Text(item), + SizedBox(height: 10), + TextFormField( + controller: _usernameController, + focusNode: _focusNodes[0], + decoration: InputDecoration( + // hintText: _showHints[0] ? 'Mohammad Hassan' : null, + hintStyle: TextStyle(color: Colors.grey), + border: OutlineInputBorder( + borderRadius: BorderRadius.circular(8), ), - ) - .toList(), - onChanged: (String? newValue) { - setState(() { - _selectedCountry = newValue; - }); - }, - validator: _validateDropdown, - ), - ), - SizedBox(height: 20), - if (!_isProfileCompleted) // Conditional rendering - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( + enabled: false, + ), + ), + SizedBox(height: 10), + Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Text( + AppLocalizations.of(context)!.email_id, + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w500, + color: Colors.grey, + ), + ), + ], + ), + SizedBox(height: 10), + TextFormField( + controller: _emailController, + focusNode: _focusNodes[1], + decoration: InputDecoration( + // hintText: _showHints[1]? 'mohammad.hassan@fcsc.gov.ae': null, + border: OutlineInputBorder( + borderRadius: BorderRadius.circular(8), + ), + enabled: false, + ), + ), + SizedBox(height: 10), + Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Text( + AppLocalizations.of(context)!.full_name, + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w500, + color: Colors.grey, + ), + ), + ], + ), + SizedBox(height: 10), + TextFormField( + enabled: false, + validator: (value) { + if (value == null || value.isEmpty) { + return 'Required'; + } + + //RegExp(r"^[a-zA-Z\s]+$"); + final nameRegex = RegExp( + r"^[a-zA-Z0-9'\-\u0627\u0639~\u00C0-\u00FF\s]+$", + ); + if (!nameRegex.hasMatch(value)) { + return 'Invalid Characters'; + } + return null; + }, + controller: _fullNameController, + focusNode: _focusNodes[2], + decoration: InputDecoration( + // hintText: _showHints[2] ? 'Mohammad' : null, + hintStyle: TextStyle(color: Colors.grey), + border: OutlineInputBorder( + borderRadius: BorderRadius.circular(8), + ), + // counterText: '', + enabled: !_isProfileCompleted, + ), + maxLength: + 40, // Set the maximum length to 20 characters + maxLengthEnforcement: + MaxLengthEnforcement.enforced, + ), + SizedBox(height: 10), + Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Text( + AppLocalizations.of(context)!.dob, + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w500, + color: Colors.grey, + ), + ), + ], + ), + SizedBox(height: 10), + TextFormField( + controller: _dateController, + focusNode: _focusNodes[3], + decoration: InputDecoration( + border: OutlineInputBorder( + borderRadius: BorderRadius.circular(8), + ), + // hintText: _showHints[3] ? 'Select your Date of Birth' : null, + hintStyle: TextStyle(color: Colors.grey), + suffixIcon: Container( + width: 45, + padding: EdgeInsets.only(right: 1), + alignment: Alignment + .center, // Center the icon vertically + child: Icon( + Icons.keyboard_arrow_down_sharp, + color: Colors.grey, + ), + ), + enabled: !_isProfileCompleted, + ), + readOnly: true, + onTap: _pickDate, + validator: _validateDob, + ), + SizedBox(height: 10), + Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Text( + AppLocalizations.of(context)!.region, + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w500, + ), + ), + ], + ), + SizedBox(height: 10), + MouseRegion( + onEnter: (_) => setState( + () => _isHoveringDropdown = true), + onExit: (_) => setState( + () => _isHoveringDropdown = false), + child: DropdownButtonFormField( + value: _selectedCountry, + decoration: InputDecoration( + border: OutlineInputBorder( + borderRadius: + BorderRadius.circular(8), + ), + labelText: 'Select', + ), + icon: Icon( + Icons.keyboard_arrow_down_sharp, + color: _isHoveringDropdown + ? Colors.black + : Colors.grey), + items: _countries + .map( + (item) => DropdownMenuItem( + value: item, + child: Text(item), + ), + ) + .toList(), + onChanged: (String? newValue) { + setState(() { + _selectedCountry = newValue; + }); + }, + validator: _validateDropdown, + ), + ), + SizedBox(height: 20), + if (!_isProfileCompleted) // Conditional rendering + Column( + crossAxisAlignment: + CrossAxisAlignment.start, children: [ - Checkbox( - value: isChecked, - onChanged: (value) { - setState(() { - isChecked = value ?? false; - showError = false; - }); - }, - side: BorderSide( - color: showError - ? Colors.red - : Colors.grey, - width: 1.5, - ), + Row( + children: [ + Checkbox( + value: isChecked, + onChanged: (value) { + setState(() { + isChecked = value ?? false; + showError = false; + }); + }, + side: BorderSide( + color: showError + ? Colors.red + : Colors.grey, + width: 1.5, + ), + ), + Expanded( + child: Column( + mainAxisAlignment: + MainAxisAlignment.start, + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + SizedBox(height: 10), + Text.rich( + TextSpan( + text: AppLocalizations.of( + context)! + .agree, + style: TextStyle( + color: Colors.black), + children: [ + TextSpan( + text: AppLocalizations + .of( + context, + )! + .terms_conditions, + style: TextStyle( + // color: Colors.blue, + color: Color( + 0xFF648CBA), + decoration: + TextDecoration + .underline, + ), + recognizer: + TapGestureRecognizer() + ..onTap = () { + // Add action for Terms & Conditions tap + }, + ), + TextSpan( + text: AppLocalizations + .of( + context, + )! + .t_and, + style: TextStyle( + color: Colors.black, + ), + ), + TextSpan( + text: AppLocalizations + .of( + context, + )! + .privacy_policy, + style: TextStyle( + // color: Colors.blue, + color: Color( + 0xFF648CBA), + decoration: + TextDecoration + .underline, + ), + recognizer: + TapGestureRecognizer() + ..onTap = () { + // Add action for Privacy Policy tap + }, + ), + TextSpan( + text: AppLocalizations + .of( + context, + )! + .conditions, + style: TextStyle( + color: Colors.black, + ), + ), + ], + ), + textAlign: TextAlign.start, + maxLines: 2, + overflow: + TextOverflow.visible, + softWrap: true, + ), + ], + ), + ), + ], ), - Expanded( - child: Column( + if (showError) + Row( mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: - CrossAxisAlignment.start, children: [ - SizedBox(height: 10), - Text.rich( - TextSpan( - text: AppLocalizations.of( - context)! - .agree, + Padding( + padding: const EdgeInsets.only( + left: 10.0), + child: Text( + 'Please agree to terms and conditions', style: TextStyle( - color: Colors.black), - children: [ - TextSpan( - text: AppLocalizations.of( - context, - )! - .terms_conditions, - style: TextStyle( - // color: Colors.blue, - color: - Color(0xFF648CBA), - decoration: - TextDecoration - .underline, - ), - recognizer: - TapGestureRecognizer() - ..onTap = () { - // Add action for Terms & Conditions tap - }, - ), - TextSpan( - text: AppLocalizations.of( - context, - )! - .t_and, - style: TextStyle( - color: Colors.black, - ), - ), - TextSpan( - text: AppLocalizations.of( - context, - )! - .privacy_policy, - style: TextStyle( - // color: Colors.blue, - color: Color(0xFF648CBA), - decoration: - TextDecoration - .underline, - ), - recognizer: - TapGestureRecognizer() - ..onTap = () { - // Add action for Privacy Policy tap - }, - ), - TextSpan( - text: AppLocalizations.of( - context, - )! - .conditions, - style: TextStyle( - color: Colors.black, - ), - ), - ], + color: Colors.red[700], + fontSize: 12, + ), ), - textAlign: TextAlign.start, - maxLines: 2, - overflow: TextOverflow.visible, - softWrap: true, ), ], ), + ], + ), + SizedBox(height: 20), + Center( + child: GestureDetector( + onTap: () { + final email = _emailController.text; + context.go( + '/createNewPw/$userId/$email?key=editProfile'); + }, + child: Text( + AppLocalizations.of(context)! + .change_password, + style: TextStyle( + color: Color(0xFF648CBA), + fontSize: 14, + fontWeight: FontWeight.w700, + fontFamily: 'Roboto', + // decoration: TextDecoration.underline + ), + ), + ), + ), + SizedBox(height: 20), + // ElevatedButton.icon( + // onPressed: () { + // showConfirmationDialog(context); + // }, + // icon: Icon( + // Icons.save, + // color: Colors.white, + // ), + // label: Text( + // AppLocalizations.of(context)!.save, + // style: TextStyle(color: Colors.white), + // ), + // style: ElevatedButton.styleFrom( + // backgroundColor: Color(0xFF92722A), + // minimumSize: Size(double.infinity, 50), + // shape: RoundedRectangleBorder( + // borderRadius: BorderRadius.circular(8), + // ), + // ), + // ), + ElevatedButton( + onPressed: () { + // if ((_formKey.currentState?.validate() ?? false) && (isChecked)) { + // _formKey.currentState?.save(); + showConfirmationDialog(context); + // } else { + // setState(() { + // showError = !isChecked; // Show error if the checkbox is not checked + // }); + // } + }, + style: ElevatedButton.styleFrom( + backgroundColor: Color(0xFF92722A), + minimumSize: Size(double.infinity, 50), + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(8), + ), + ), + child: Row( + mainAxisAlignment: MainAxisAlignment + .center, // Center the content + children: [ + Text( + AppLocalizations.of(context)!.save, + style: TextStyle(color: Colors.white), + ), + SizedBox( + width: + 8), // Add space between text and icon + Image.asset( + MiscIconAssetPath.save, + color: Colors.white, + width: 20, + height: 20, ), ], ), - if (showError) - Row( - mainAxisAlignment: - MainAxisAlignment.start, - children: [ - Padding( - padding: const EdgeInsets.only( - left: 10.0), - child: Text( - 'Please agree to terms and conditions', - style: TextStyle( - color: Colors.red[700], - fontSize: 12, - ), - ), - ), - ], - ), - ], - ), - SizedBox(height: 20), - Center( - child: GestureDetector( - onTap: () { - final email = _emailController.text; - context.go( - '/createNewPw/$userId/$email?key=editProfile'); - }, - child: Text( - AppLocalizations.of(context)! - .change_password, - style: TextStyle( - color: Color(0xFF648CBA), - fontSize: 14, - fontWeight: FontWeight.w700, - fontFamily: 'Roboto', - // decoration: TextDecoration.underline - ), - ), - ), + ) + ], ), - SizedBox(height: 20), - // ElevatedButton.icon( - // onPressed: () { - // showConfirmationDialog(context); - // }, - // icon: Icon( - // Icons.save, - // color: Colors.white, - // ), - // label: Text( - // AppLocalizations.of(context)!.save, - // style: TextStyle(color: Colors.white), - // ), - // style: ElevatedButton.styleFrom( - // backgroundColor: Color(0xFF92722A), - // minimumSize: Size(double.infinity, 50), - // shape: RoundedRectangleBorder( - // borderRadius: BorderRadius.circular(8), - // ), - // ), - // ), - ElevatedButton( - onPressed: () { - // if ((_formKey.currentState?.validate() ?? false) && (isChecked)) { - // _formKey.currentState?.save(); - showConfirmationDialog(context); - // } else { - // setState(() { - // showError = !isChecked; // Show error if the checkbox is not checked - // }); - // } - }, - style: ElevatedButton.styleFrom( - backgroundColor: Color(0xFF92722A), - minimumSize: Size(double.infinity, 50), - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(8), - ), - ), - child: Row( - mainAxisAlignment: MainAxisAlignment.center, // Center the content - children: [ - Text( - AppLocalizations.of(context)!.save, - style: TextStyle(color: Colors.white), - ), - SizedBox(width: 8), // Add space between text and icon - Image.asset( - MiscIconAssetPath.save, - color: Colors.white, - width: 20, - height: 20, - ), - ], - ), - ) - - ], - ), + ), + ), ), - ), + ], ), - ], + ), ), - ), - ), - //bottomNavigationBar: MyBottomNavBar(), - ); + //bottomNavigationBar: MyBottomNavBar(), + )); } } diff --git a/lib/presentation/routes/drawer_routes/Drawer Items/feedback.dart b/lib/presentation/routes/drawer_routes/Drawer Items/feedback.dart index 2560157f..83beb9bc 100644 --- a/lib/presentation/routes/drawer_routes/Drawer Items/feedback.dart +++ b/lib/presentation/routes/drawer_routes/Drawer Items/feedback.dart @@ -237,43 +237,50 @@ class _FeedbackFormState extends State // final userName = uri.queryParameters['userName'] ?? 'Guest User'; final userName = GoRouterState.of(context).extra as String? ?? 'Guest User'; - return BaseScaffold( - // title: Text("Feedback"), - title: Text( - AppLocalizations.of(context)!.feedback_title, - style: TextStyle( - fontSize: 24, fontFamily: 'Roboto', fontWeight: FontWeight.w500), - ), - // appBar: AppBar( - // backgroundColor: const Color(0xFFf8f9ff), - // title: Text(AppLocalizations.of(context)!.feedback_title), - // actions: [ - // Align( - // alignment: AlignmentDirectional.topEnd, - // child: LangToggle( - // onSaveFeedback: _saveFeedbackText, - // onLoadFeedback: _loadFeedbackText, - // selectedEmojiIndex: _selectedEmojiIndex ?? 0, - // easeOfUseRating: _easeOfUseRating, - // qualityRating: _qualityRating, - // designRating: _designRating, - // redundancyRating: _redundancyRating, - // ), - // ), - // ], - // ), - body: Padding( - padding: const EdgeInsets.only( - top: 8.0, bottom: 16.0, left: 23.0, right: 23.0), - child: SingleChildScrollView( - child: _isFeedbackSubmitted - ? _buildThankYouMessage(userName) - : _isFeedbackFailed - ? _buildFailureMessage() - : _buildFeedbackForm(), - ), - ), - ); + return PopScope( + onPopInvokedWithResult: (didPop, result) { + if (didPop) return; + context.go('/myhomepage'); + }, + child: BaseScaffold( + // title: Text("Feedback"), + title: Text( + AppLocalizations.of(context)!.feedback_title, + style: TextStyle( + fontSize: 24, + fontFamily: 'Roboto', + fontWeight: FontWeight.w500), + ), + // appBar: AppBar( + // backgroundColor: const Color(0xFFf8f9ff), + // title: Text(AppLocalizations.of(context)!.feedback_title), + // actions: [ + // Align( + // alignment: AlignmentDirectional.topEnd, + // child: LangToggle( + // onSaveFeedback: _saveFeedbackText, + // onLoadFeedback: _loadFeedbackText, + // selectedEmojiIndex: _selectedEmojiIndex ?? 0, + // easeOfUseRating: _easeOfUseRating, + // qualityRating: _qualityRating, + // designRating: _designRating, + // redundancyRating: _redundancyRating, + // ), + // ), + // ], + // ), + body: Padding( + padding: const EdgeInsets.only( + top: 8.0, bottom: 16.0, left: 23.0, right: 23.0), + child: SingleChildScrollView( + child: _isFeedbackSubmitted + ? _buildThankYouMessage(userName) + : _isFeedbackFailed + ? _buildFailureMessage() + : _buildFeedbackForm(), + ), + ), + )); } Widget _buildFeedbackForm() { @@ -295,20 +302,21 @@ class _FeedbackFormState extends State ), const SizedBox(height: 20), Center( - child: FittedBox( - fit: BoxFit - .scaleDown, // This will make the text smaller to fit within the available space - child: Text( - context.translate('How was your experience with us today?', - 'كيف كانت تجربتك معنا اليوم؟'), - style: const TextStyle( - fontSize: 18, - fontFamily: 'Roboto', - fontWeight: FontWeight.w400, - color: Color(0xff898C81), + child: FittedBox( + fit: BoxFit + .scaleDown, // This will make the text smaller to fit within the available space + child: Text( + context.translate('How was your experience with us today?', + 'كيف كانت تجربتك معنا اليوم؟'), + style: const TextStyle( + fontSize: 18, + fontFamily: 'Roboto', + fontWeight: FontWeight.w400, + color: Color(0xff898C81), + ), ), ), - ),), + ), const SizedBox(height: 15), Container( width: double.infinity, @@ -539,7 +547,7 @@ class _FeedbackFormState extends State Text( // "Thank you", - 'Thank you $userName !', + 'Thank you $userName !', style: const TextStyle(fontSize: 24, fontWeight: FontWeight.bold), ), const SizedBox(height: 15), @@ -586,19 +594,22 @@ class _FeedbackFormState extends State child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ - Image.asset( - FeedBackAssetPath.errorfb, - width: 40, - height: 40, - ),])), - - + Image.asset( + FeedBackAssetPath.errorfb, + width: 40, + height: 40, + ), + ])), // Icon(Icons.error, size: 80, color: Colors.red), const SizedBox(height: 20), - const Text("Failed to Share Feedback", - style: TextStyle(fontSize: 24, fontWeight: FontWeight.bold, - color: Color(0xFF414042)),), + const Text( + "Failed to Share Feedback", + style: TextStyle( + fontSize: 24, + fontWeight: FontWeight.bold, + color: Color(0xFF414042)), + ), const SizedBox(height: 10), Text(AppLocalizations.of(context)!.feedback_failed_msg, style: const TextStyle(fontSize: 16, color: Color(0xFF898C81)), @@ -642,7 +653,6 @@ class _FeedbackFormState extends State ), child: Column( mainAxisSize: MainAxisSize.min, - children: [ icon, // Assuming `icon` is an Icon widget SizedBox(height: 3), @@ -656,7 +666,7 @@ class _FeedbackFormState extends State fontFamily: 'Roboto', fontWeight: FontWeight.w400, fontSize: 14, - color: Colors.black, + color: Colors.black, // color: isSelected ? Colors.green : Colors.black, ), ), @@ -697,7 +707,6 @@ class _FeedbackFormState extends State Function(double) onRatingUpdate, ) { return Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text(label, @@ -976,4 +985,4 @@ class LangToggle extends ConsumerWidget { pathColorWhenOff: Colors.grey.shade300, ); } -} \ No newline at end of file +} diff --git a/lib/presentation/routes/drawer_routes/Drawer Items/manage_users.dart b/lib/presentation/routes/drawer_routes/Drawer Items/manage_users.dart index 2406f9a8..37655d7c 100644 --- a/lib/presentation/routes/drawer_routes/Drawer Items/manage_users.dart +++ b/lib/presentation/routes/drawer_routes/Drawer Items/manage_users.dart @@ -1,4 +1,5 @@ import 'package:flutter/material.dart'; +import 'package:go_router/go_router.dart'; import 'package:intl/intl.dart'; import 'package:pocketbase/pocketbase.dart'; import 'package:uae_stat/presentation/components/my_bottom_nav_bar.dart'; @@ -224,135 +225,148 @@ class _ManageUserRouterState extends State { @override Widget build(BuildContext context) { - final Map statusOptions = { 'Approved': AppLocalizations.of(context)!.approved, 'Denied': AppLocalizations.of(context)!.denied, 'Pending': AppLocalizations.of(context)!.pending, }; - double myheight = MediaQuery.of(context).size.height; - return BaseScaffold( - // title: Text("Manage User"), - title: Text( - AppLocalizations.of(context)!.manage_user, - ), - body: SingleChildScrollView( - child: Padding( - padding: const EdgeInsets.only(left: 10.0, right: 10.0, top: 3.0), - child: Column( - children: [ - TextField( - decoration: InputDecoration( - prefixIcon: const Icon(Icons.search), - hintText: 'Search', - border: OutlineInputBorder( - borderRadius: BorderRadius.all(Radius.circular(20)), + + return PopScope( + onPopInvokedWithResult: (didPop, result) { + if (didPop) return; + context.go('/myhomepage'); + }, + child: BaseScaffold( + // title: Text("Manage User"), + title: Text( + AppLocalizations.of(context)!.manage_user, + ), + body: SingleChildScrollView( + child: Padding( + padding: const EdgeInsets.only(left: 10.0, right: 10.0, top: 3.0), + child: Column( + children: [ + TextField( + decoration: InputDecoration( + prefixIcon: const Icon(Icons.search), + hintText: 'Search', + border: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(20)), + ), ), + onChanged: filterUsers, ), - onChanged: filterUsers, - ), - SizedBox(height: myheight / 40), - SingleChildScrollView( - scrollDirection: Axis.horizontal, - child: ConstrainedBox( - constraints: BoxConstraints( - minWidth: MediaQuery.of(context).size.width, - ), - child: DataTable( - sortColumnIndex: _sortColumnIndex, - sortAscending: _isAscending, - columns: [ - DataColumn( - label: Text( - AppLocalizations.of(context)!.user_name, + SizedBox(height: myheight / 40), + SingleChildScrollView( + scrollDirection: Axis.horizontal, + child: ConstrainedBox( + constraints: BoxConstraints( + minWidth: MediaQuery.of(context).size.width, + ), + child: DataTable( + sortColumnIndex: _sortColumnIndex, + sortAscending: _isAscending, + columns: [ + DataColumn( + label: Text( + AppLocalizations.of(context)!.user_name, + ), + onSort: (columnIndex, ascending) { + _sort((user) => user.userName.toLowerCase(), + columnIndex, ascending); + }, ), - onSort: (columnIndex, ascending) { - _sort((user) => user.userName.toLowerCase(), - columnIndex, ascending); - }, - ), - DataColumn( - label: Text( AppLocalizations.of(context)!.email_id,), - onSort: (columnIndex, ascending) { - _sort((user) => user.emailId.toLowerCase(), - columnIndex, ascending); - }, - ), - DataColumn( - label: Text(AppLocalizations.of(context)!.reg_date,), - onSort: (columnIndex, ascending) { - _sort( - (user) => DateFormat('dd/MM/yyyy') - .parse(user.registrationDate), - columnIndex, - ascending, - ); - }, - ), - DataColumn( - label: Text(AppLocalizations.of(context)!.status,), - onSort: (columnIndex, ascending) { - _sort((user) => user.status.toLowerCase(), - columnIndex, ascending); - }, - ), - ], - rows: filteredUserData.isEmpty - ? [ - DataRow( - cells: List.generate( - 4, // Ensure it matches the number of DataColumns - (index) => DataCell( - index == 0 - ? Text( - 'No results found', - style: TextStyle( - fontStyle: FontStyle.italic), - ) - : const Text( - ''), // Empty cells for other columns - placeholder: true, - ), - ), - ), - ] - : filteredUserData.map((user) { - return DataRow( - cells: [ - DataCell(Text(user.userName)), - DataCell(Text(user.emailId)), - DataCell(Text(user.registrationDate)), - DataCell( - DropdownButton( - value: user.status, - items: statusOptions.entries.map((status) { - return DropdownMenuItem( - value: status.key, - child: Text( - status.value, - style: TextStyle( - color: getStatusColor(status.key),), - ), - ); - }).toList(), - onChanged: (newStatus) { - print(user); - if (newStatus != null) { - _showConfirmationDialog( - user, newStatus); - } - }, + DataColumn( + label: Text( + AppLocalizations.of(context)!.email_id, + ), + onSort: (columnIndex, ascending) { + _sort((user) => user.emailId.toLowerCase(), + columnIndex, ascending); + }, + ), + DataColumn( + label: Text( + AppLocalizations.of(context)!.reg_date, + ), + onSort: (columnIndex, ascending) { + _sort( + (user) => DateFormat('dd/MM/yyyy') + .parse(user.registrationDate), + columnIndex, + ascending, + ); + }, + ), + DataColumn( + label: Text( + AppLocalizations.of(context)!.status, + ), + onSort: (columnIndex, ascending) { + _sort((user) => user.status.toLowerCase(), + columnIndex, ascending); + }, + ), + ], + rows: filteredUserData.isEmpty + ? [ + DataRow( + cells: List.generate( + 4, // Ensure it matches the number of DataColumns + (index) => DataCell( + index == 0 + ? Text( + 'No results found', + style: TextStyle( + fontStyle: FontStyle.italic), + ) + : const Text( + ''), // Empty cells for other columns + placeholder: true, ), ), - ], - ); - }).toList(), + ), + ] + : filteredUserData.map((user) { + return DataRow( + cells: [ + DataCell(Text(user.userName)), + DataCell(Text(user.emailId)), + DataCell(Text(user.registrationDate)), + DataCell( + DropdownButton( + value: user.status, + items: + statusOptions.entries.map((status) { + return DropdownMenuItem( + value: status.key, + child: Text( + status.value, + style: TextStyle( + color: getStatusColor(status.key), + ), + ), + ); + }).toList(), + onChanged: (newStatus) { + print(user); + if (newStatus != null) { + _showConfirmationDialog( + user, newStatus); + } + }, + ), + ), + ], + ); + }).toList(), + ), ), ), - ), - ], + ], + ), ), ), ), diff --git a/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/AboutTheApp/AboutFCSC.dart b/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/AboutTheApp/AboutFCSC.dart index 06fbe525..616912c4 100755 --- a/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/AboutTheApp/AboutFCSC.dart +++ b/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/AboutTheApp/AboutFCSC.dart @@ -12,78 +12,85 @@ class aboutFCSC extends StatelessWidget { final fcscBanner = Image.asset( BannerAssetPath.fcsc, height: 56, - alignment:Alignment.center, + alignment: Alignment.center, ); - return BaseScaffold( showDivider: true, - showBackButton: true, - dividerColor: Colors.grey[300], - appbarColor: Colors.white, - bottomColor: Colors.white, - mycenterTitle: true, - title: Padding( - padding:EdgeInsets.only(bottom:8.0), - child: Text('Getting Started', - style: TextStyle( - fontFamily: 'Roboto', - fontSize: 22, - color: Color(0xFF7DAFBC), - // fontWeight: FontWeight.normal, - fontWeight: FontWeight.w500, - ), - ), - ) , - body: Container( - width: double.infinity, - color: Colors.white, - padding: EdgeInsets.all(16), - child: Column( - children: [ - Align( - alignment: Alignment.topLeft, - child: Text('About FCSC', + return BaseScaffold( + showDivider: true, + dividerColor: Colors.grey[300], + appbarColor: Colors.white, + bottomColor: Colors.white, + mycenterTitle: true, + title: Padding( + padding: EdgeInsets.only(bottom: 8.0), + child: Text( + 'Getting Started', + style: TextStyle( + fontFamily: 'Roboto', + fontSize: 22, + color: Color(0xFF7DAFBC), + // fontWeight: FontWeight.normal, + fontWeight: FontWeight.w500, + ), + ), + ), + body: Container( + width: double.infinity, + color: Colors.white, + padding: EdgeInsets.all(16), + child: Column(children: [ + Align( + alignment: Alignment.topLeft, + child: Text( + 'About FCSC', + style: TextStyle( + fontSize: 20, + color: Color(0xFF414042), + fontWeight: FontWeight.w600, + fontFamily: 'Roboto', + ), + ), + ), + SizedBox( + width: MediaQuery.of(context).size.width, + height: MediaQuery.of(context).size.height * 0.36, + child: Image.asset( + 'assets/user_guide/AboutFCSC.png', + fit: BoxFit.contain, + ), + ), + SizedBox( + height: 5, + ), + RichText( + text: TextSpan( + text: 'The ', + style: TextStyle( + color: Colors.grey, fontSize: 16, fontFamily: 'Roboto'), + children: const [ + TextSpan( + text: + ' Federal Competitiveness and Statistics Centre (FCSC),', style: TextStyle( - fontSize:20, - color: Color(0xFF414042), - fontWeight: FontWeight.w600, - fontFamily: 'Roboto', - ),), - ), - SizedBox( - width:MediaQuery.of(context).size.width, - height:MediaQuery.of(context).size.height * 0.36, - child: Image.asset( - 'assets/user_guide/AboutFCSC.png', - fit: BoxFit.contain, + fontWeight: FontWeight.bold, + color: Color(0xFF414042), + fontFamily: 'Roboto'), ), - ), - SizedBox(height: 5,), - RichText( - text: TextSpan( - text: 'The ', - style: TextStyle( - color:Colors.grey, - fontSize: 16, - fontFamily: 'Roboto' - ), - children: const [ - TextSpan(text: ' Federal Competitiveness and Statistics Centre (FCSC),', - style: TextStyle( - fontWeight: FontWeight.bold, - color:Color(0xFF414042), - fontFamily: 'Roboto' - ),), - TextSpan(text: ' in your App is designed to provide registered and approved users with access to accurate and comprehensive statistics about the UAE. The app serves as a centralized platform for exploring key datasets, trends, and insights across various sectors.'), - ], - ), + TextSpan( + text: + ' in your App is designed to provide registered and approved users with access to accurate and comprehensive statistics about the UAE. The app serves as a centralized platform for exploring key datasets, trends, and insights across various sectors.'), + ], ), - Spacer(), - Align( - alignment: Alignment.bottomCenter, - child: fcscBanner, - ), - SizedBox(height: 25,), - ] - ), - ),); + ), + Spacer(), + Align( + alignment: Alignment.bottomCenter, + child: fcscBanner, + ), + SizedBox( + height: 25, + ), + ]), + ), + ); } } diff --git a/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/AboutTheApp/getStarted.dart b/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/AboutTheApp/getStarted.dart index 865d1587..82bbfa55 100755 --- a/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/AboutTheApp/getStarted.dart +++ b/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/AboutTheApp/getStarted.dart @@ -12,122 +12,138 @@ class GetStarted extends StatelessWidget { final fcscBanner = Image.asset( BannerAssetPath.fcsc, height: 56, - alignment:Alignment.center, + alignment: Alignment.center, ); return Theme( data: ThemeData( - fontFamily: 'Roboto', // Set default font family for this page - textTheme: TextTheme( - bodyMedium: TextStyle(fontSize: 16, color: Color(0xFF898C81)), + fontFamily: 'Roboto', // Set default font family for this page + textTheme: TextTheme( + bodyMedium: TextStyle(fontSize: 16, color: Color(0xFF898C81)), + ), ), - ), - child: BaseScaffold( showDivider: true, - showBackButton: true, - dividerColor: Colors.grey[300], - appbarColor: Colors.white, - bottomColor: Colors.white, - mycenterTitle: true, - title: Padding( - padding:EdgeInsets.only(bottom:8.0), - child: Text('Getting Started', - style: TextStyle( - fontSize:22, - color: Color(0xFF7DAFBC), - fontWeight: FontWeight.w500, - // fontWeight: FontWeight.w500, + child: BaseScaffold( + showDivider: true, + dividerColor: Colors.grey[300], + appbarColor: Colors.white, + bottomColor: Colors.white, + mycenterTitle: true, + title: Padding( + padding: EdgeInsets.only(bottom: 8.0), + child: Text( + 'Getting Started', + style: TextStyle( + fontSize: 22, + color: Color(0xFF7DAFBC), + fontWeight: FontWeight.w500, + // fontWeight: FontWeight.w500, + ), ), ), - ) , - body: Container( - height: double.infinity, - color: Colors.white, - padding: EdgeInsets.all(16), - child: SingleChildScrollView( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Align( - alignment: Alignment.topLeft, - child: Text('How to Get Started', - style: - TextStyle( - fontSize:20, - color: Color(0xFF414042), - fontWeight: FontWeight.w600, - ),), - ), - SizedBox( - width:MediaQuery.of(context).size.width, - height:MediaQuery.of(context).size.height * 0.36, - child: Image.asset( - 'assets/user_guide/getStarted.png', - fit: BoxFit.contain, + body: Container( + height: double.infinity, + color: Colors.white, + padding: EdgeInsets.all(16), + child: SingleChildScrollView( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Align( + alignment: Alignment.topLeft, + child: Text( + 'How to Get Started', + style: TextStyle( + fontSize: 20, + color: Color(0xFF414042), + fontWeight: FontWeight.w600, + ), + ), ), - ), - Row( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding( - padding: const EdgeInsets.only(top : 8.0), - child: Icon(Icons.brightness_1, size: 5, color: Color(0xFF414042),), - ), // Bullet point - SizedBox(width: 8), // Space between bullet and text - Expanded( - child: Text( - '1. Download the app from the App Store or Google Play Store.', - textAlign: TextAlign.justify, // Align the text - softWrap: true, - ), + SizedBox( + width: MediaQuery.of(context).size.width, + height: MediaQuery.of(context).size.height * 0.36, + child: Image.asset( + 'assets/user_guide/getStarted.png', + fit: BoxFit.contain, ), - ], - ), - Row( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding( - padding: const EdgeInsets.only(top : 8.0), - child: Icon(Icons.brightness_1, size: 5, color: Color(0xFF414042),), - ), // Bullet point - SizedBox(width: 8), // Space between bullet and text - Expanded( - child: Text( - '2. Log in to unlock advanced features or continue as a guest.', - textAlign: TextAlign.justify, // Align the text - softWrap: true, + ), + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: const EdgeInsets.only(top: 8.0), + child: Icon( + Icons.brightness_1, + size: 5, + color: Color(0xFF414042), + ), + ), // Bullet point + SizedBox(width: 8), // Space between bullet and text + Expanded( + child: Text( + '1. Download the app from the App Store or Google Play Store.', + textAlign: TextAlign.justify, // Align the text + softWrap: true, + ), ), - ), - ], - ), - Row( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding( - padding: const EdgeInsets.only(top : 8.0), - child: Icon(Icons.brightness_1, size: 5, color: Color(0xFF414042),), - ), // Bullet point - SizedBox(width: 8), // Space between bullet and text - Expanded( - child: Text( - '3. Log in to unlock advanced features or continue as a guest.', - textAlign: TextAlign.justify, // Align the text - softWrap: true, + ], + ), + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: const EdgeInsets.only(top: 8.0), + child: Icon( + Icons.brightness_1, + size: 5, + color: Color(0xFF414042), + ), + ), // Bullet point + SizedBox(width: 8), // Space between bullet and text + Expanded( + child: Text( + '2. Log in to unlock advanced features or continue as a guest.', + textAlign: TextAlign.justify, // Align the text + softWrap: true, + ), ), - ), - ], - ), - SizedBox( - height:MediaQuery.of(context).size.height * 0.1, - ), - Align( - alignment: Alignment.bottomCenter, - child: fcscBanner, - ), - SizedBox(height: 25,), - - ], + ], + ), + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: const EdgeInsets.only(top: 8.0), + child: Icon( + Icons.brightness_1, + size: 5, + color: Color(0xFF414042), + ), + ), // Bullet point + SizedBox(width: 8), // Space between bullet and text + Expanded( + child: Text( + '3. Log in to unlock advanced features or continue as a guest.', + textAlign: TextAlign.justify, // Align the text + softWrap: true, + ), + ), + ], + ), + SizedBox( + height: MediaQuery.of(context).size.height * 0.1, + ), + Align( + alignment: Alignment.bottomCenter, + child: fcscBanner, + ), + SizedBox( + height: 25, + ), + ], + ), ), ), ), - ),); + ); } -} \ No newline at end of file +} diff --git a/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/KeyFeatures/AppFeatures.dart b/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/KeyFeatures/AppFeatures.dart index 05a6965b..0fbeba15 100755 --- a/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/KeyFeatures/AppFeatures.dart +++ b/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/KeyFeatures/AppFeatures.dart @@ -4,11 +4,11 @@ import '../../../../../../infrastructure/services/img_asset_paths/banner_asset_p import '../../../custom_drawer_routes.dart'; class AppFeatures extends StatelessWidget { - AppFeatures({super.key}); + AppFeatures({super.key}); final fcscBanner = Image.asset( BannerAssetPath.fcsc, height: 56, - alignment:Alignment.center, + alignment: Alignment.center, ); @override Widget build(BuildContext context) { @@ -19,24 +19,25 @@ class AppFeatures extends StatelessWidget { bodyMedium: TextStyle(fontSize: 16, color: Color(0xFF898C81)), ), ), - child: BaseScaffold( showDivider: true, - showBackButton: true, - bottomColor:Colors.white, + child: BaseScaffold( + showDivider: true, + bottomColor: Colors.white, dividerColor: Colors.grey[300], appbarColor: Colors.white, mycenterTitle: true, title: Padding( - padding:EdgeInsets.only(bottom:8.0), - child: Text('Key Features', + padding: EdgeInsets.only(bottom: 8.0), + child: Text( + 'Key Features', style: TextStyle( - fontSize:22, + fontSize: 22, color: Color(0xFF7DAFBC), fontWeight: FontWeight.w500, // fontWeight: FontWeight.w500, ), ), - ) , - body: Container( + ), + body: Container( width: double.infinity, color: Colors.white, padding: EdgeInsets.all(16), @@ -45,55 +46,58 @@ class AppFeatures extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Align( - alignment: Alignment.topLeft, - child: Text('App Features', - style: - TextStyle( - fontSize:20, - color: Color(0xFF414042), - fontWeight: FontWeight.w600, - ),), - ), - SizedBox( - width:MediaQuery.of(context).size.width, - height:MediaQuery.of(context).size.height * 0.36, - child: Image.asset( - 'assets/user_guide/appFeatures.png', - fit: BoxFit.contain, - ), - ), - Text('1.Comprehensive Statistics:', - style:TextStyle( - fontSize:16, - color: Color(0xFF414042), - fontWeight: FontWeight.w600, + alignment: Alignment.topLeft, + child: Text( + 'App Features', + style: TextStyle( + fontSize: 20, + color: Color(0xFF414042), + fontWeight: FontWeight.w600, + ), + ), ), + SizedBox( + width: MediaQuery.of(context).size.width, + height: MediaQuery.of(context).size.height * 0.36, + child: Image.asset( + 'assets/user_guide/appFeatures.png', + fit: BoxFit.contain, + ), + ), + Text( + '1.Comprehensive Statistics:', + style: TextStyle( + fontSize: 16, + color: Color(0xFF414042), + fontWeight: FontWeight.w600, + ), ), SizedBox(height: 8), Row( crossAxisAlignment: CrossAxisAlignment.start, children: [ Padding( - padding: const EdgeInsets.only(top : 6.0), + padding: const EdgeInsets.only(top: 6.0), child: Icon(Icons.brightness_1, size: 5), ), // Bullet point SizedBox(width: 8), // Space between bullet and text Expanded( child: RichText( text: TextSpan( - text: 'Access detailed datasets across categories such as Economy, Environment, Social, ', + text: + 'Access detailed datasets across categories such as Economy, Environment, Social, ', style: TextStyle( - color:Color(0xFF898C81), + color: Color(0xFF898C81), fontSize: 16, - fontFamily: 'Roboto' - ), + fontFamily: 'Roboto'), children: const [ - TextSpan(text: 'Economy, Environment, Social, ', + TextSpan( + text: 'Economy, Environment, Social, ', style: TextStyle( fontWeight: FontWeight.bold, color: Color(0xFF414042), - fontFamily: 'Roboto' - ),), + fontFamily: 'Roboto'), + ), TextSpan(text: 'and more.'), ], ), @@ -105,8 +109,12 @@ class AppFeatures extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Padding( - padding: const EdgeInsets.only(top : 8.0), - child: Icon(Icons.brightness_1, size: 5, color: Color(0xFF414042),), + padding: const EdgeInsets.only(top: 8.0), + child: Icon( + Icons.brightness_1, + size: 5, + color: Color(0xFF414042), + ), ), // Bullet point SizedBox(width: 8), // Space between bullet and text Expanded( @@ -118,11 +126,11 @@ class AppFeatures extends StatelessWidget { ), ], ), - SizedBox(height: 8), - Text(' 2. Drilldown Navigation:', - style:TextStyle( - fontSize:16, + Text( + ' 2. Drilldown Navigation:', + style: TextStyle( + fontSize: 16, color: Color(0xFF414042), fontWeight: FontWeight.w600, ), @@ -132,8 +140,12 @@ class AppFeatures extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Padding( - padding: const EdgeInsets.only(top : 8.0), - child: Icon(Icons.brightness_1, size: 5, color: Color(0xFF414042),), + padding: const EdgeInsets.only(top: 8.0), + child: Icon( + Icons.brightness_1, + size: 5, + color: Color(0xFF414042), + ), ), // Bullet point SizedBox(width: 8), // Space between bullet and text Expanded( @@ -146,9 +158,10 @@ class AppFeatures extends StatelessWidget { ], ), SizedBox(height: 8), - Text('3. Interactive Visualizations:', - style:TextStyle( - fontSize:16, + Text( + '3. Interactive Visualizations:', + style: TextStyle( + fontSize: 16, color: Color(0xFF414042), fontWeight: FontWeight.w600, ), @@ -158,8 +171,12 @@ class AppFeatures extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Padding( - padding: const EdgeInsets.only(top : 8.0), - child: Icon(Icons.brightness_1, size: 5, color: Color(0xFF414042),), + padding: const EdgeInsets.only(top: 8.0), + child: Icon( + Icons.brightness_1, + size: 5, + color: Color(0xFF414042), + ), ), // Bullet point SizedBox(width: 8), // Space between bullet and text Expanded( @@ -171,23 +188,21 @@ class AppFeatures extends StatelessWidget { ), ], ), - SizedBox(height: 25,), + SizedBox( + height: 25, + ), Align( alignment: Alignment.bottomCenter, child: fcscBanner, ), - SizedBox(height: 25,), - - ], - ), + SizedBox( + height: 25, + ), + ], + ), ), - ), - ) - ,); + ), + ), + ); } } - - - - - diff --git a/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/KeyFeatures/ChangeMyPassword.dart b/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/KeyFeatures/ChangeMyPassword.dart index 0f35974a..0db02f39 100755 --- a/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/KeyFeatures/ChangeMyPassword.dart +++ b/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/KeyFeatures/ChangeMyPassword.dart @@ -8,7 +8,7 @@ class ChangeMyPassword extends StatelessWidget { final fcscBanner = Image.asset( BannerAssetPath.fcsc, height: 56, - alignment:Alignment.center, + alignment: Alignment.center, ); @override Widget build(BuildContext context) { @@ -19,24 +19,25 @@ class ChangeMyPassword extends StatelessWidget { bodyMedium: TextStyle(fontSize: 16, color: Color(0xFF898C81)), ), ), - child: BaseScaffold( showDivider: true, + child: BaseScaffold( + showDivider: true, bottomColor: Colors.white, - showBackButton: true, dividerColor: Colors.grey[300], appbarColor: Colors.white, mycenterTitle: true, title: Padding( - padding:EdgeInsets.only(bottom:8.0), - child: Text('App Features', + padding: EdgeInsets.only(bottom: 8.0), + child: Text( + 'App Features', style: TextStyle( - fontSize:22, + fontSize: 22, color: Color(0xFF7DAFBC), fontWeight: FontWeight.w500, // fontWeight: FontWeight.w500, ), ), - ) , - body: Container( + ), + body: Container( width: double.infinity, color: Colors.white, padding: EdgeInsets.all(16), @@ -46,37 +47,40 @@ class ChangeMyPassword extends StatelessWidget { children: [ Align( alignment: Alignment.topLeft, - child: Text('How to Change My Password', - style: - TextStyle( - fontSize:20, + child: Text( + 'How to Change My Password', + style: TextStyle( + fontSize: 20, color: Color(0xFF414042), fontWeight: FontWeight.w600, - ),), + ), + ), ), SizedBox( - width:MediaQuery.of(context).size.width, - height:MediaQuery.of(context).size.height * 0.36, + width: MediaQuery.of(context).size.width, + height: MediaQuery.of(context).size.height * 0.36, child: Image.asset( 'assets/user_guide/changePassword.png', fit: BoxFit.contain, ), ), Text( - 'Changing your password helps keep your account secure. Follow these steps to update your password:', + 'Changing your password helps keep your account secure. Follow these steps to update your password:', ), SizedBox(height: 12), - Text('Steps to Change Password', - style:TextStyle( - fontSize:22, + Text( + 'Steps to Change Password', + style: TextStyle( + fontSize: 22, color: Color(0xFF414042), fontWeight: FontWeight.w600, ), ), SizedBox(height: 8), - Text('1. Access the Change Password Page:', - style:TextStyle( - fontSize:16, + Text( + '1. Access the Change Password Page:', + style: TextStyle( + fontSize: 16, color: Color(0xFF414042), fontWeight: FontWeight.w600, ), @@ -86,23 +90,33 @@ class ChangeMyPassword extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Padding( - padding: const EdgeInsets.only(top : 8.0), - child: Icon(Icons.brightness_1, size: 5, color: Color(0xFF414042),), + padding: const EdgeInsets.only(top: 8.0), + child: Icon( + Icons.brightness_1, + size: 5, + color: Color(0xFF414042), + ), ), // Bullet point SizedBox(width: 8), // Space between bullet and text Expanded( - child: RichText( + child: RichText( text: TextSpan( text: 'From the Profile page, tap on the ', - style: TextStyle(fontSize: 16, color: Color(0xFF898C81), fontFamily: 'Roboto'), + style: TextStyle( + fontSize: 16, + color: Color(0xFF898C81), + fontFamily: 'Roboto'), children: const [ - TextSpan(text: '"Change Password"', + TextSpan( + text: '"Change Password"', style: TextStyle( fontWeight: FontWeight.w600, color: Color(0xFF414042), - fontFamily: 'Roboto' - ),), - TextSpan(text:' link at the bottom.',) + fontFamily: 'Roboto'), + ), + TextSpan( + text: ' link at the bottom.', + ) ], ), ), @@ -110,9 +124,10 @@ class ChangeMyPassword extends StatelessWidget { ], ), SizedBox(height: 8), - Text('2. Enter Old Password:', - style:TextStyle( - fontSize:16, + Text( + '2. Enter Old Password:', + style: TextStyle( + fontSize: 16, color: Color(0xFF414042), fontWeight: FontWeight.w600, ), @@ -122,7 +137,7 @@ class ChangeMyPassword extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Padding( - padding: const EdgeInsets.only(top : 8.0), + padding: const EdgeInsets.only(top: 8.0), child: Icon(Icons.brightness_1, size: 5), ), // Bullet point SizedBox(width: 8), // Space between bullet and text @@ -136,9 +151,10 @@ class ChangeMyPassword extends StatelessWidget { ], ), SizedBox(height: 8), - Text('3. Set a New Password:', - style:TextStyle( - fontSize:16, + Text( + '3. Set a New Password:', + style: TextStyle( + fontSize: 16, color: Color(0xFF414042), fontWeight: FontWeight.w600, ), @@ -148,8 +164,12 @@ class ChangeMyPassword extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Padding( - padding: const EdgeInsets.only(top : 8.0), - child: Icon(Icons.brightness_1, size: 5, color: Color(0xFF414042),), + padding: const EdgeInsets.only(top: 8.0), + child: Icon( + Icons.brightness_1, + size: 5, + color: Color(0xFF414042), + ), ), // Bullet point SizedBox(width: 8), // Space between bullet and text Expanded( @@ -165,8 +185,12 @@ class ChangeMyPassword extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Padding( - padding: const EdgeInsets.only(top : 8.0), - child: Icon(Icons.brightness_1, size: 5, color: Color(0xFF414042),), + padding: const EdgeInsets.only(top: 8.0), + child: Icon( + Icons.brightness_1, + size: 5, + color: Color(0xFF414042), + ), ), // Bullet point SizedBox(width: 8), // Space between bullet and text Expanded( @@ -179,9 +203,10 @@ class ChangeMyPassword extends StatelessWidget { ], ), SizedBox(height: 8), - Text('4. Password Requirements:', - style:TextStyle( - fontSize:16, + Text( + '4. Password Requirements:', + style: TextStyle( + fontSize: 16, color: Color(0xFF414042), fontWeight: FontWeight.w600, ), @@ -191,8 +216,12 @@ class ChangeMyPassword extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Padding( - padding: const EdgeInsets.only(top : 8.0), - child: Icon(Icons.brightness_1, size: 5, color: Color(0xFF414042),), + padding: const EdgeInsets.only(top: 8.0), + child: Icon( + Icons.brightness_1, + size: 5, + color: Color(0xFF414042), + ), ), // Bullet point SizedBox(width: 8), // Space between bullet and text Expanded( @@ -205,9 +234,10 @@ class ChangeMyPassword extends StatelessWidget { ], ), SizedBox(height: 8), - Text('5. Save Your Password:', - style:TextStyle( - fontSize:16, + Text( + '5. Save Your Password:', + style: TextStyle( + fontSize: 16, color: Color(0xFF414042), fontWeight: FontWeight.w600, ), @@ -217,23 +247,33 @@ class ChangeMyPassword extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Padding( - padding: const EdgeInsets.only(top : 8.0), - child: Icon(Icons.brightness_1, size: 5, color: Color(0xFF414042),), + padding: const EdgeInsets.only(top: 8.0), + child: Icon( + Icons.brightness_1, + size: 5, + color: Color(0xFF414042), + ), ), // Bullet point SizedBox(width: 8), // Space between bullet and text Expanded( - child: RichText( + child: RichText( text: TextSpan( text: 'Tap the ', - style: TextStyle(fontSize: 16, color: Color(0xFF898C81), fontFamily: 'Roboto'), + style: TextStyle( + fontSize: 16, + color: Color(0xFF898C81), + fontFamily: 'Roboto'), children: const [ - TextSpan(text: 'Save ', + TextSpan( + text: 'Save ', style: TextStyle( fontWeight: FontWeight.w600, color: Color(0xFF414042), - fontFamily: 'Roboto' - ),), - TextSpan(text:'button',) + fontFamily: 'Roboto'), + ), + TextSpan( + text: 'button', + ) ], ), ), @@ -244,8 +284,12 @@ class ChangeMyPassword extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Padding( - padding: const EdgeInsets.only(top : 8.0), - child: Icon(Icons.brightness_1, size: 5, color: Color(0xFF414042),), + padding: const EdgeInsets.only(top: 8.0), + child: Icon( + Icons.brightness_1, + size: 5, + color: Color(0xFF414042), + ), ), // Bullet point SizedBox(width: 8), // Space between bullet and text Expanded( @@ -258,9 +302,10 @@ class ChangeMyPassword extends StatelessWidget { ], ), SizedBox(height: 8), - Text('6. Re-Login:', - style:TextStyle( - fontSize:16, + Text( + '6. Re-Login:', + style: TextStyle( + fontSize: 16, color: Color(0xFF414042), fontWeight: FontWeight.w600, ), @@ -270,8 +315,12 @@ class ChangeMyPassword extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Padding( - padding: const EdgeInsets.only(top : 8.0), - child: Icon(Icons.brightness_1, size: 5, color: Color(0xFF414042),), + padding: const EdgeInsets.only(top: 8.0), + child: Icon( + Icons.brightness_1, + size: 5, + color: Color(0xFF414042), + ), ), // Bullet point SizedBox(width: 8), // Space between bullet and text Expanded( @@ -283,23 +332,21 @@ class ChangeMyPassword extends StatelessWidget { ), ], ), - SizedBox(height: 25,), + SizedBox( + height: 25, + ), Align( alignment: Alignment.bottomCenter, child: fcscBanner, ), - SizedBox(height: 25,), - + SizedBox( + height: 25, + ), ], ), ), ), - ) - ,); + ), + ); } } - - - - - diff --git a/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/KeyFeatures/EditMyProfile.dart b/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/KeyFeatures/EditMyProfile.dart index a56b552a..32d26816 100755 --- a/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/KeyFeatures/EditMyProfile.dart +++ b/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/KeyFeatures/EditMyProfile.dart @@ -8,7 +8,7 @@ class EditMyProfile extends StatelessWidget { final fcscBanner = Image.asset( BannerAssetPath.fcsc, height: 56, - alignment:Alignment.center, + alignment: Alignment.center, ); @override Widget build(BuildContext context) { @@ -19,24 +19,25 @@ class EditMyProfile extends StatelessWidget { bodyMedium: TextStyle(fontSize: 16, color: Color(0xFF898C81)), ), ), - child: BaseScaffold( showDivider: true, - showBackButton: true, + child: BaseScaffold( + showDivider: true, bottomColor: Colors.white, dividerColor: Colors.grey[300], appbarColor: Colors.white, mycenterTitle: true, title: Padding( - padding:EdgeInsets.only(bottom:8.0), - child: Text('App Features', + padding: EdgeInsets.only(bottom: 8.0), + child: Text( + 'App Features', style: TextStyle( - fontSize:22, + fontSize: 22, color: Color(0xFF7DAFBC), fontWeight: FontWeight.w500, // fontWeight: FontWeight.w500, ), ), - ) , - body: Container( + ), + body: Container( width: double.infinity, color: Colors.white, padding: EdgeInsets.all(16), @@ -46,17 +47,18 @@ class EditMyProfile extends StatelessWidget { children: [ Align( alignment: Alignment.topLeft, - child: Text('How to Edit My Profile', - style: - TextStyle( - fontSize:20, + child: Text( + 'How to Edit My Profile', + style: TextStyle( + fontSize: 20, color: Color(0xFF414042), fontWeight: FontWeight.w600, - ),), + ), + ), ), SizedBox( - width:MediaQuery.of(context).size.width, - height:MediaQuery.of(context).size.height * 0.36, + width: MediaQuery.of(context).size.width, + height: MediaQuery.of(context).size.height * 0.36, child: Image.asset( 'assets/user_guide/editProfile.png', fit: BoxFit.contain, @@ -66,17 +68,19 @@ class EditMyProfile extends StatelessWidget { 'Editing your profile allows you to update specific information while ensuring that critical details remain secure. Follow the steps below to update your profile:', ), SizedBox(height: 12), - Text('Steps to Edit Profile', - style:TextStyle( - fontSize:22, + Text( + 'Steps to Edit Profile', + style: TextStyle( + fontSize: 22, color: Color(0xFF414042), fontWeight: FontWeight.w600, ), ), SizedBox(height: 8), - Text('1. Access the Profile Page:', - style:TextStyle( - fontSize:16, + Text( + '1. Access the Profile Page:', + style: TextStyle( + fontSize: 16, color: Color(0xFF414042), fontWeight: FontWeight.w600, ), @@ -86,33 +90,44 @@ class EditMyProfile extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Padding( - padding: const EdgeInsets.only(top : 8.0), - child: Icon(Icons.brightness_1, size: 5, color: Color(0xFF414042),), + padding: const EdgeInsets.only(top: 8.0), + child: Icon( + Icons.brightness_1, + size: 5, + color: Color(0xFF414042), + ), ), // Bullet point SizedBox(width: 8), // Space between bullet and text Expanded( - child: RichText( - text: TextSpan( - text: 'Tap on the ', - style: TextStyle(fontSize: 16, color: Color(0xFF898C81), fontFamily: 'Roboto'), - children: const [ - TextSpan(text: '"Profile"', - style: TextStyle( - fontWeight: FontWeight.w600, - color: Color(0xFF414042), - fontFamily: 'Roboto' - ),), - TextSpan(text:' option from the navigation bar at the top left corner of the screen.',) - ], + child: RichText( + text: TextSpan( + text: 'Tap on the ', + style: TextStyle( + fontSize: 16, + color: Color(0xFF898C81), + fontFamily: 'Roboto'), + children: const [ + TextSpan( + text: '"Profile"', + style: TextStyle( + fontWeight: FontWeight.w600, + color: Color(0xFF414042), + fontFamily: 'Roboto'), ), - ) - ), + TextSpan( + text: + ' option from the navigation bar at the top left corner of the screen.', + ) + ], + ), + )), ], ), SizedBox(height: 8), - Text('2. Editable Fields:', - style:TextStyle( - fontSize:16, + Text( + '2. Editable Fields:', + style: TextStyle( + fontSize: 16, color: Color(0xFF414042), fontWeight: FontWeight.w600, ), @@ -122,26 +137,32 @@ class EditMyProfile extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Padding( - padding: const EdgeInsets.only(top : 8.0), + padding: const EdgeInsets.only(top: 8.0), child: Icon(Icons.brightness_1, size: 5), ), // Bullet point SizedBox(width: 8), // Space between bullet and text Expanded( - child: RichText( - text: TextSpan( - style: TextStyle(fontSize: 16, color: Color(0xFF898C81), fontFamily: 'Roboto'), - children: const [ - TextSpan(text: 'Full Name:', - style: TextStyle( - fontWeight: FontWeight.w600, - color: Color(0xFF414042), - fontFamily: 'Roboto' - ),), - TextSpan(text:' Tap the text box to enter your name (up to 40 alphanumeric characters).',) - ], - ), - ) - ), + child: RichText( + text: TextSpan( + style: TextStyle( + fontSize: 16, + color: Color(0xFF898C81), + fontFamily: 'Roboto'), + children: const [ + TextSpan( + text: 'Full Name:', + style: TextStyle( + fontWeight: FontWeight.w600, + color: Color(0xFF414042), + fontFamily: 'Roboto'), + ), + TextSpan( + text: + ' Tap the text box to enter your name (up to 40 alphanumeric characters).', + ) + ], + ), + )), ], ), SizedBox(height: 8), @@ -149,26 +170,32 @@ class EditMyProfile extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Padding( - padding: const EdgeInsets.only(top : 8.0), + padding: const EdgeInsets.only(top: 8.0), child: Icon(Icons.brightness_1, size: 5), ), // Bullet point SizedBox(width: 8), // Space between bullet and text Expanded( - child: RichText( - text: TextSpan( - style: TextStyle(fontSize: 16, color: Color(0xFF898C81), fontFamily: 'Roboto'), - children: const [ - TextSpan(text: 'Date of Birth: ', - style: TextStyle( - fontWeight: FontWeight.w600, - color: Color(0xFF414042), - fontFamily: 'Roboto' - ),), - TextSpan(text:' Use the calendar dropdown to select your date of birth.',) - ], + child: RichText( + text: TextSpan( + style: TextStyle( + fontSize: 16, + color: Color(0xFF898C81), + fontFamily: 'Roboto'), + children: const [ + TextSpan( + text: 'Date of Birth: ', + style: TextStyle( + fontWeight: FontWeight.w600, + color: Color(0xFF414042), + fontFamily: 'Roboto'), ), - ) - ), + TextSpan( + text: + ' Use the calendar dropdown to select your date of birth.', + ) + ], + ), + )), ], ), SizedBox(height: 8), @@ -176,26 +203,32 @@ class EditMyProfile extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Padding( - padding: const EdgeInsets.only(top : 8.0), + padding: const EdgeInsets.only(top: 8.0), child: Icon(Icons.brightness_1, size: 5), ), // Bullet point SizedBox(width: 8), // Space between bullet and text Expanded( - child: RichText( - text: TextSpan( - style: TextStyle(fontSize: 16, color: Color(0xFF898C81), fontFamily: 'Roboto'), - children: const [ - TextSpan(text: 'Country/Region: ', - style: TextStyle( - fontWeight: FontWeight.w600, - color: Color(0xFF414042), - fontFamily: 'Roboto' - ),), - TextSpan(text:' Choose your current location from the dropdown menu.',), - ], + child: RichText( + text: TextSpan( + style: TextStyle( + fontSize: 16, + color: Color(0xFF898C81), + fontFamily: 'Roboto'), + children: const [ + TextSpan( + text: 'Country/Region: ', + style: TextStyle( + fontWeight: FontWeight.w600, + color: Color(0xFF414042), + fontFamily: 'Roboto'), ), - ) - ), + TextSpan( + text: + ' Choose your current location from the dropdown menu.', + ), + ], + ), + )), ], ), SizedBox(height: 8), @@ -203,32 +236,39 @@ class EditMyProfile extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Padding( - padding: const EdgeInsets.only(top : 8.0), + padding: const EdgeInsets.only(top: 8.0), child: Icon(Icons.brightness_1, size: 5), ), // Bullet point SizedBox(width: 8), // Space between bullet and text Expanded( - child: RichText( - text: TextSpan( - style: TextStyle(fontSize: 16, color: Color(0xFF898C81), fontFamily: 'Roboto'), - children: const [ - TextSpan(text: 'User Image: ', - style: TextStyle( - fontWeight: FontWeight.w600, - color: Color(0xFF414042), - fontFamily: 'Roboto' - ),), - TextSpan(text:'Tap on the avatar icon to upload or change your profile picture.',), - ], + child: RichText( + text: TextSpan( + style: TextStyle( + fontSize: 16, + color: Color(0xFF898C81), + fontFamily: 'Roboto'), + children: const [ + TextSpan( + text: 'User Image: ', + style: TextStyle( + fontWeight: FontWeight.w600, + color: Color(0xFF414042), + fontFamily: 'Roboto'), ), - ) - ), + TextSpan( + text: + 'Tap on the avatar icon to upload or change your profile picture.', + ), + ], + ), + )), ], ), SizedBox(height: 8), - Text('3. Non-Editable Fields:', - style:TextStyle( - fontSize:16, + Text( + '3. Non-Editable Fields:', + style: TextStyle( + fontSize: 16, color: Color(0xFF414042), fontWeight: FontWeight.w600, ), @@ -238,39 +278,49 @@ class EditMyProfile extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Padding( - padding: const EdgeInsets.only(top : 8.0), + padding: const EdgeInsets.only(top: 8.0), child: Icon(Icons.brightness_1, size: 5), ), // Bullet point SizedBox(width: 8), // Space between bullet and text Expanded( - child: RichText( - text: TextSpan( - style: TextStyle(fontSize: 16, color: Color(0xFF898C81), fontFamily: 'Roboto'), - children: const [ - TextSpan(text: 'Username ', - style: TextStyle( - fontWeight: FontWeight.w600, - color: Color(0xFF414042), - fontFamily: 'Roboto' - ),), - TextSpan(text:'and ',), - TextSpan(text: 'Email Id: ', - style: TextStyle( - fontWeight: FontWeight.w600, - color: Color(0xFF414042), - fontFamily: 'Roboto' - ),), - TextSpan(text:'These fields cannot be edited to ensure the integrity of your account.',), - ], + child: RichText( + text: TextSpan( + style: TextStyle( + fontSize: 16, + color: Color(0xFF898C81), + fontFamily: 'Roboto'), + children: const [ + TextSpan( + text: 'Username ', + style: TextStyle( + fontWeight: FontWeight.w600, + color: Color(0xFF414042), + fontFamily: 'Roboto'), ), - ) - ), + TextSpan( + text: 'and ', + ), + TextSpan( + text: 'Email Id: ', + style: TextStyle( + fontWeight: FontWeight.w600, + color: Color(0xFF414042), + fontFamily: 'Roboto'), + ), + TextSpan( + text: + 'These fields cannot be edited to ensure the integrity of your account.', + ), + ], + ), + )), ], ), SizedBox(height: 8), - Text('4. Agree to Terms and Conditions:', - style:TextStyle( - fontSize:16, + Text( + '4. Agree to Terms and Conditions:', + style: TextStyle( + fontSize: 16, color: Color(0xFF414042), fontWeight: FontWeight.w600, ), @@ -280,8 +330,12 @@ class EditMyProfile extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Padding( - padding: const EdgeInsets.only(top : 8.0), - child: Icon(Icons.brightness_1, size: 5, color: Color(0xFF414042),), + padding: const EdgeInsets.only(top: 8.0), + child: Icon( + Icons.brightness_1, + size: 5, + color: Color(0xFF414042), + ), ), // Bullet point SizedBox(width: 8), // Space between bullet and text Expanded( @@ -294,9 +348,10 @@ class EditMyProfile extends StatelessWidget { ], ), SizedBox(height: 8), - Text('4. Save Your Changes:', - style:TextStyle( - fontSize:16, + Text( + '4. Save Your Changes:', + style: TextStyle( + fontSize: 16, color: Color(0xFF414042), fontWeight: FontWeight.w600, ), @@ -306,26 +361,36 @@ class EditMyProfile extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Padding( - padding: const EdgeInsets.only(top : 8.0), - child: Icon(Icons.brightness_1, size: 5, color: Color(0xFF414042),), + padding: const EdgeInsets.only(top: 8.0), + child: Icon( + Icons.brightness_1, + size: 5, + color: Color(0xFF414042), + ), ), // Bullet point SizedBox(width: 8), // Space between bullet and text Expanded( - child: RichText( - text: TextSpan( - text: 'Tap the ', - style: TextStyle(fontSize: 16, color: Color(0xFF898C81), fontFamily: 'Roboto'), - children: const [ - TextSpan(text: 'Save', - style: TextStyle( - fontWeight: FontWeight.w600, - color: Color(0xFF414042), - fontFamily: 'Roboto' - ),), - TextSpan(text:' button at the bottom of the screen.',) - ], - ), + child: RichText( + text: TextSpan( + text: 'Tap the ', + style: TextStyle( + fontSize: 16, + color: Color(0xFF898C81), + fontFamily: 'Roboto'), + children: const [ + TextSpan( + text: 'Save', + style: TextStyle( + fontWeight: FontWeight.w600, + color: Color(0xFF414042), + fontFamily: 'Roboto'), + ), + TextSpan( + text: ' button at the bottom of the screen.', + ) + ], ), + ), ), ], ), @@ -334,8 +399,12 @@ class EditMyProfile extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Padding( - padding: const EdgeInsets.only(top : 8.0), - child: Icon(Icons.brightness_1, size: 5, color: Color(0xFF414042),), + padding: const EdgeInsets.only(top: 8.0), + child: Icon( + Icons.brightness_1, + size: 5, + color: Color(0xFF414042), + ), ), // Bullet point SizedBox(width: 8), // Space between bullet and text Expanded( @@ -352,53 +421,64 @@ class EditMyProfile extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Padding( - padding: const EdgeInsets.only(top : 8.0), - child: Icon(Icons.brightness_1, size: 5, color: Color(0xFF414042),), + padding: const EdgeInsets.only(top: 8.0), + child: Icon( + Icons.brightness_1, + size: 5, + color: Color(0xFF414042), + ), ), // Bullet point SizedBox(width: 8), // Space between bullet and text Expanded( - child:RichText( + child: RichText( text: TextSpan( text: 'Select ', - style: TextStyle(fontSize: 16, color: Color(0xFF898C81), fontFamily: 'Roboto'), + style: TextStyle( + fontSize: 16, + color: Color(0xFF898C81), + fontFamily: 'Roboto'), children: const [ - TextSpan(text: 'Confirm', + TextSpan( + text: 'Confirm', style: TextStyle( fontWeight: FontWeight.w600, color: Color(0xFF414042), - fontFamily: 'Roboto' - ),), - TextSpan(text:' to save the changes',), - TextSpan(text: ' Cancel', + fontFamily: 'Roboto'), + ), + TextSpan( + text: ' to save the changes', + ), + TextSpan( + text: ' Cancel', style: TextStyle( fontWeight: FontWeight.w600, color: Color(0xFF414042), - fontFamily: 'Roboto' - ),), - TextSpan(text:' to go back.',), + fontFamily: 'Roboto'), + ), + TextSpan( + text: ' to go back.', + ), ], ), ), ), ], ), - SizedBox(height: 25,), + SizedBox( + height: 25, + ), Align( alignment: Alignment.bottomCenter, child: fcscBanner, ), - SizedBox(height: 25,), - + SizedBox( + height: 25, + ), ], ), ), ), - ) - ,); + ), + ); } } - - - - - diff --git a/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/KeyFeatures/howUseTheApp.dart b/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/KeyFeatures/howUseTheApp.dart index 9e2901b1..e6ad832c 100755 --- a/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/KeyFeatures/howUseTheApp.dart +++ b/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/KeyFeatures/howUseTheApp.dart @@ -8,7 +8,7 @@ class HowUseTheApp extends StatelessWidget { final fcscBanner = Image.asset( BannerAssetPath.fcsc, height: 56, - alignment:Alignment.center, + alignment: Alignment.center, ); @override Widget build(BuildContext context) { @@ -19,24 +19,25 @@ class HowUseTheApp extends StatelessWidget { bodyMedium: TextStyle(fontSize: 16, color: Color(0xFF898C81)), ), ), - child: BaseScaffold( showDivider: true, - showBackButton: true, + child: BaseScaffold( + showDivider: true, dividerColor: Colors.grey[300], appbarColor: Colors.white, bottomColor: Colors.white, mycenterTitle: true, title: Padding( - padding:EdgeInsets.only(bottom:8.0), - child: Text('Key Features', + padding: EdgeInsets.only(bottom: 8.0), + child: Text( + 'Key Features', style: TextStyle( - fontSize:22, + fontSize: 22, color: Color(0xFF7DAFBC), fontWeight: FontWeight.w500, // fontWeight: FontWeight.w500, ), ), - ) , - body: Container( + ), + body: Container( width: double.infinity, color: Colors.white, padding: EdgeInsets.all(16), @@ -46,25 +47,27 @@ class HowUseTheApp extends StatelessWidget { children: [ Align( alignment: Alignment.topLeft, - child: Text('How to Use the App', - style: - TextStyle( - fontSize:20, + child: Text( + 'How to Use the App', + style: TextStyle( + fontSize: 20, color: Color(0xFF414042), fontWeight: FontWeight.w600, - ),), + ), + ), ), SizedBox( - width:MediaQuery.of(context).size.width, - height:MediaQuery.of(context).size.height * 0.36, + width: MediaQuery.of(context).size.width, + height: MediaQuery.of(context).size.height * 0.36, child: Image.asset( 'assets/user_guide/howUse.png', fit: BoxFit.contain, ), ), - Text('1. Registration and Approval:', - style:TextStyle( - fontSize:16, + Text( + '1. Registration and Approval:', + style: TextStyle( + fontSize: 16, color: Color(0xFF414042), fontWeight: FontWeight.w600, ), @@ -74,8 +77,12 @@ class HowUseTheApp extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Padding( - padding: const EdgeInsets.only(top : 8.0), - child: Icon(Icons.brightness_1, size: 5, color: Color(0xFF414042),), + padding: const EdgeInsets.only(top: 8.0), + child: Icon( + Icons.brightness_1, + size: 5, + color: Color(0xFF414042), + ), ), // Bullet point SizedBox(width: 8), // Space between bullet and text Expanded( @@ -88,9 +95,10 @@ class HowUseTheApp extends StatelessWidget { ], ), SizedBox(height: 8), - Text('2. Login and Navigation:', - style:TextStyle( - fontSize:16, + Text( + '2. Login and Navigation:', + style: TextStyle( + fontSize: 16, color: Color(0xFF414042), fontWeight: FontWeight.w600, ), @@ -100,8 +108,12 @@ class HowUseTheApp extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Padding( - padding: const EdgeInsets.only(top : 8.0), - child: Icon(Icons.brightness_1, size: 5, color: Color(0xFF414042),), + padding: const EdgeInsets.only(top: 8.0), + child: Icon( + Icons.brightness_1, + size: 5, + color: Color(0xFF414042), + ), ), // Bullet point SizedBox(width: 8), // Space between bullet and text Expanded( @@ -114,9 +126,10 @@ class HowUseTheApp extends StatelessWidget { ], ), SizedBox(height: 8), - Text('3. Access Data:', - style:TextStyle( - fontSize:16, + Text( + '3. Access Data:', + style: TextStyle( + fontSize: 16, color: Color(0xFF414042), fontWeight: FontWeight.w600, ), @@ -126,8 +139,12 @@ class HowUseTheApp extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Padding( - padding: const EdgeInsets.only(top : 8.0), - child: Icon(Icons.brightness_1, size: 5, color: Color(0xFF414042),), + padding: const EdgeInsets.only(top: 8.0), + child: Icon( + Icons.brightness_1, + size: 5, + color: Color(0xFF414042), + ), ), // Bullet point SizedBox(width: 8), // Space between bullet and text Expanded( @@ -140,9 +157,10 @@ class HowUseTheApp extends StatelessWidget { ], ), SizedBox(height: 8), - Text('4. Bookmark Metrics:', - style:TextStyle( - fontSize:16, + Text( + '4. Bookmark Metrics:', + style: TextStyle( + fontSize: 16, color: Color(0xFF414042), fontWeight: FontWeight.w600, ), @@ -152,8 +170,12 @@ class HowUseTheApp extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Padding( - padding: const EdgeInsets.only(top : 8.0), - child: Icon(Icons.brightness_1, size: 5, color: Color(0xFF414042),), + padding: const EdgeInsets.only(top: 8.0), + child: Icon( + Icons.brightness_1, + size: 5, + color: Color(0xFF414042), + ), ), // Bullet point SizedBox(width: 8), // Space between bullet and text Expanded( @@ -165,23 +187,21 @@ class HowUseTheApp extends StatelessWidget { ), ], ), - SizedBox(height: 25,), + SizedBox( + height: 25, + ), Align( alignment: Alignment.bottomCenter, child: fcscBanner, ), - SizedBox(height: 25,), - + SizedBox( + height: 25, + ), ], ), ), ), - ) - ,); + ), + ); } } - - - - - diff --git a/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/KeyFeatures/purpose.dart b/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/KeyFeatures/purpose.dart index 1bcae2cb..d61602a3 100755 --- a/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/KeyFeatures/purpose.dart +++ b/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/KeyFeatures/purpose.dart @@ -8,7 +8,7 @@ class Purpose extends StatelessWidget { final fcscBanner = Image.asset( BannerAssetPath.fcsc, height: 56, - alignment:Alignment.center, + alignment: Alignment.center, ); @override Widget build(BuildContext context) { @@ -16,27 +16,31 @@ class Purpose extends StatelessWidget { data: ThemeData( fontFamily: 'Roboto', // Set default font family for this page textTheme: TextTheme( - bodyMedium: TextStyle(fontSize: 16, color:Color(0xFF898C81),), + bodyMedium: TextStyle( + fontSize: 16, + color: Color(0xFF898C81), + ), ), ), - child: BaseScaffold( showDivider: true, - showBackButton: true, + child: BaseScaffold( + showDivider: true, dividerColor: Colors.grey[300], appbarColor: Colors.white, bottomColor: Colors.white, mycenterTitle: true, title: Padding( - padding:EdgeInsets.only(bottom:8.0), - child: Text('Key Features', + padding: EdgeInsets.only(bottom: 8.0), + child: Text( + 'Key Features', style: TextStyle( - fontSize:22, + fontSize: 22, color: Color(0xFF7DAFBC), fontWeight: FontWeight.w500, // fontWeight: FontWeight.w500, ), ), - ) , - body: Container( + ), + body: Container( height: double.infinity, color: Colors.white, padding: EdgeInsets.all(16), @@ -46,17 +50,18 @@ class Purpose extends StatelessWidget { children: [ Align( alignment: Alignment.topLeft, - child: Text('Purpose of the App', - style: - TextStyle( - fontSize:20, + child: Text( + 'Purpose of the App', + style: TextStyle( + fontSize: 20, color: Color(0xFF414042), fontWeight: FontWeight.w600, - ),), + ), + ), ), SizedBox( - width:MediaQuery.of(context).size.width, - height:MediaQuery.of(context).size.height * 0.36, + width: MediaQuery.of(context).size.width, + height: MediaQuery.of(context).size.height * 0.36, child: Image.asset( 'assets/user_guide/purpose.png', fit: BoxFit.contain, @@ -67,27 +72,32 @@ class Purpose extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Padding( - padding: const EdgeInsets.only(top : 8.0), - child: Icon(Icons.brightness_1, size: 5, color: Color(0xFF414042),), + padding: const EdgeInsets.only(top: 8.0), + child: Icon( + Icons.brightness_1, + size: 5, + color: Color(0xFF414042), + ), ), // Bullet point SizedBox(width: 8), // Space between bullet and text Expanded( - child: RichText( + child: RichText( text: TextSpan( text: 'Provide ', style: TextStyle( - color:Color(0xFF898C81), + color: Color(0xFF898C81), fontSize: 16, - fontFamily: 'Roboto' - ), + fontFamily: 'Roboto'), children: const [ - TextSpan(text: 'official statistics ', + TextSpan( + text: 'official statistics ', style: TextStyle( fontWeight: FontWeight.bold, color: Color(0xFF414042), - fontFamily: 'Roboto' - ),), - TextSpan(text: 'on the UAE in an accessible format.'), + fontFamily: 'Roboto'), + ), + TextSpan( + text: 'on the UAE in an accessible format.'), ], ), ), @@ -98,8 +108,12 @@ class Purpose extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Padding( - padding: const EdgeInsets.only(top : 8.0), - child: Icon(Icons.brightness_1, size: 5, color: Color(0xFF414042),), + padding: const EdgeInsets.only(top: 8.0), + child: Icon( + Icons.brightness_1, + size: 5, + color: Color(0xFF414042), + ), ), // Bullet point SizedBox(width: 8), // Space between bullet and text Expanded( @@ -115,8 +129,12 @@ class Purpose extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Padding( - padding: const EdgeInsets.only(top : 8.0), - child: Icon(Icons.brightness_1, size: 5, color: Color(0xFF414042),), + padding: const EdgeInsets.only(top: 8.0), + child: Icon( + Icons.brightness_1, + size: 5, + color: Color(0xFF414042), + ), ), // Bullet point SizedBox(width: 8), // Space between bullet and text Expanded( @@ -128,23 +146,21 @@ class Purpose extends StatelessWidget { ), ], ), - SizedBox(height: 40,), + SizedBox( + height: 40, + ), Align( alignment: Alignment.bottomCenter, child: fcscBanner, ), - SizedBox(height: 25,), - + SizedBox( + height: 25, + ), ], ), ), ), - ) - ,); + ), + ); } } - - - - - diff --git a/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/KeyFeatures/stayUpdate.dart b/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/KeyFeatures/stayUpdate.dart index 4a15db3f..3c2bbe37 100755 --- a/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/KeyFeatures/stayUpdate.dart +++ b/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/KeyFeatures/stayUpdate.dart @@ -8,7 +8,7 @@ class StayUpdate extends StatelessWidget { final fcscBanner = Image.asset( BannerAssetPath.fcsc, height: 56, - alignment:Alignment.center, + alignment: Alignment.center, ); @override Widget build(BuildContext context) { @@ -16,27 +16,31 @@ class StayUpdate extends StatelessWidget { data: ThemeData( fontFamily: 'Roboto', // Set default font family for this page textTheme: TextTheme( - bodyMedium: TextStyle(fontSize: 16, color:Color(0xFF898C81),), + bodyMedium: TextStyle( + fontSize: 16, + color: Color(0xFF898C81), + ), ), ), - child: BaseScaffold( showDivider: true, - showBackButton: true, + child: BaseScaffold( + showDivider: true, dividerColor: Colors.grey[300], appbarColor: Colors.white, bottomColor: Colors.white, mycenterTitle: true, title: Padding( - padding:EdgeInsets.only(bottom:8.0), - child: Text('Key Features', + padding: EdgeInsets.only(bottom: 8.0), + child: Text( + 'Key Features', style: TextStyle( - fontSize:22, + fontSize: 22, color: Color(0xFF7DAFBC), fontWeight: FontWeight.w500, // fontWeight: FontWeight.w500, ), ), - ) , - body: Container( + ), + body: Container( height: double.infinity, color: Colors.white, padding: EdgeInsets.all(16), @@ -46,17 +50,18 @@ class StayUpdate extends StatelessWidget { children: [ Align( alignment: Alignment.topLeft, - child: Text('Stay Updated', - style: - TextStyle( - fontSize:20, + child: Text( + 'Stay Updated', + style: TextStyle( + fontSize: 20, color: Color(0xFF414042), fontWeight: FontWeight.w600, - ),), + ), + ), ), SizedBox( - width:MediaQuery.of(context).size.width, - height:MediaQuery.of(context).size.height * 0.36, + width: MediaQuery.of(context).size.width, + height: MediaQuery.of(context).size.height * 0.36, child: Image.asset( 'assets/user_guide/stayUpdate.png', fit: BoxFit.contain, @@ -67,8 +72,12 @@ class StayUpdate extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Padding( - padding: const EdgeInsets.only(top : 8.0), - child: Icon(Icons.brightness_1, size: 5, color: Color(0xFF414042),), + padding: const EdgeInsets.only(top: 8.0), + child: Icon( + Icons.brightness_1, + size: 5, + color: Color(0xFF414042), + ), ), // Bullet point SizedBox(width: 8), // Space between bullet and text Expanded( @@ -80,24 +89,21 @@ class StayUpdate extends StatelessWidget { ), ], ), - - SizedBox(height: 150,), + SizedBox( + height: 150, + ), Align( alignment: Alignment.bottomCenter, child: fcscBanner, ), - SizedBox(height: 25,), - + SizedBox( + height: 25, + ), ], ), ), ), - ) - ,); + ), + ); } } - - - - - diff --git a/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/KeyFeatures/useTheApp.dart b/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/KeyFeatures/useTheApp.dart index e5f9601b..2b76c420 100755 --- a/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/KeyFeatures/useTheApp.dart +++ b/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/KeyFeatures/useTheApp.dart @@ -8,7 +8,7 @@ class WhoUseTheApp extends StatelessWidget { final fcscBanner = Image.asset( BannerAssetPath.fcsc, height: 56, - alignment:Alignment.center, + alignment: Alignment.center, ); @override Widget build(BuildContext context) { @@ -19,24 +19,25 @@ class WhoUseTheApp extends StatelessWidget { bodyMedium: TextStyle(fontSize: 16, color: Color(0xFF898C81)), ), ), - child: BaseScaffold( showDivider: true, - showBackButton: true, + child: BaseScaffold( + showDivider: true, dividerColor: Colors.grey[300], appbarColor: Colors.white, bottomColor: Colors.white, mycenterTitle: true, title: Padding( - padding:EdgeInsets.only(bottom:8.0), - child: Text('Key Features', + padding: EdgeInsets.only(bottom: 8.0), + child: Text( + 'Key Features', style: TextStyle( - fontSize:22, + fontSize: 22, color: Color(0xFF7DAFBC), fontWeight: FontWeight.w500, // fontWeight: FontWeight.w500, ), ), - ) , - body: Container( + ), + body: Container( height: double.infinity, color: Colors.white, padding: EdgeInsets.all(16), @@ -46,25 +47,27 @@ class WhoUseTheApp extends StatelessWidget { children: [ Align( alignment: Alignment.topLeft, - child: Text('Who Use the App', - style: - TextStyle( - fontSize:20, + child: Text( + 'Who Use the App', + style: TextStyle( + fontSize: 20, color: Color(0xFF414042), fontWeight: FontWeight.w600, - ),), + ), + ), ), SizedBox( - width:MediaQuery.of(context).size.width, - height:MediaQuery.of(context).size.height * 0.36, + width: MediaQuery.of(context).size.width, + height: MediaQuery.of(context).size.height * 0.36, child: Image.asset( 'assets/user_guide/whoUse.png', fit: BoxFit.contain, ), ), - Text('This app is intended for:', - style:TextStyle( - fontSize:16, + Text( + 'This app is intended for:', + style: TextStyle( + fontSize: 16, color: Color(0xFF414042), fontWeight: FontWeight.w600, ), @@ -74,8 +77,12 @@ class WhoUseTheApp extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Padding( - padding: const EdgeInsets.only(top : 8.0), - child: Icon(Icons.brightness_1, size: 5, color: Color(0xFF414042),), + padding: const EdgeInsets.only(top: 8.0), + child: Icon( + Icons.brightness_1, + size: 5, + color: Color(0xFF414042), + ), ), // Bullet point SizedBox(width: 8), // Space between bullet and text Expanded( @@ -91,8 +98,12 @@ class WhoUseTheApp extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Padding( - padding: const EdgeInsets.only(top : 8.0), - child: Icon(Icons.brightness_1, size: 5, color: Color(0xFF414042),), + padding: const EdgeInsets.only(top: 8.0), + child: Icon( + Icons.brightness_1, + size: 5, + color: Color(0xFF414042), + ), ), // Bullet point SizedBox(width: 8), // Space between bullet and text Expanded( @@ -108,8 +119,12 @@ class WhoUseTheApp extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Padding( - padding: const EdgeInsets.only(top : 8.0), - child: Icon(Icons.brightness_1, size: 5, color: Color(0xFF414042),), + padding: const EdgeInsets.only(top: 8.0), + child: Icon( + Icons.brightness_1, + size: 5, + color: Color(0xFF414042), + ), ), // Bullet point SizedBox(width: 8), // Space between bullet and text Expanded( @@ -121,23 +136,21 @@ class WhoUseTheApp extends StatelessWidget { ), ], ), - SizedBox(height: 50,), + SizedBox( + height: 50, + ), Align( alignment: Alignment.bottomCenter, child: fcscBanner, ), - SizedBox(height: 25,), - + SizedBox( + height: 25, + ), ], ), ), ), - ) - ,); + ), + ); } } - - - - - diff --git a/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/aboutApp.dart b/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/aboutApp.dart index f466fe90..70a5c6d4 100755 --- a/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/aboutApp.dart +++ b/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/aboutApp.dart @@ -9,91 +9,100 @@ class aboutTheApp extends StatelessWidget { @override Widget build(BuildContext context) { - final fcscBanner = Image.asset( BannerAssetPath.fcsc, height: 56, - alignment:Alignment.center, + alignment: Alignment.center, ); - return BaseScaffold( showDivider: true, - showBackButton: true, - bottomColor: Colors.white, - dividerColor: Colors.grey[300], - appbarColor: Colors.white, - mycenterTitle: true, - title: Padding( - padding:EdgeInsets.only(bottom:8.0), - child: Text('Getting Started', - style: TextStyle( - fontSize:22, - fontFamily: 'Roboto', - color: Color(0xFF7DAFBC), - fontWeight: FontWeight.w500, - // fontWeight: FontWeight.w500, + return BaseScaffold( + showDivider: true, + bottomColor: Colors.white, + dividerColor: Colors.grey[300], + appbarColor: Colors.white, + mycenterTitle: true, + title: Padding( + padding: EdgeInsets.only(bottom: 8.0), + child: Text( + 'Getting Started', + style: TextStyle( + fontSize: 22, + fontFamily: 'Roboto', + color: Color(0xFF7DAFBC), + fontWeight: FontWeight.w500, + // fontWeight: FontWeight.w500, + ), + ), ), - ), - ) , - body: Container( - width: double.infinity, - color: Colors.white, - child: Column( - children: [ + body: Container( + width: double.infinity, + color: Colors.white, + child: Column( + children: [ Container( decoration: BoxDecoration( border: Border( - bottom: BorderSide(color: Colors.grey.shade300, width: 0.5), // Grey bottom line + bottom: BorderSide( + color: Colors.grey.shade300, + width: 0.5), // Grey bottom line ), ), child: ListTile( - onTap: (){ + onTap: () { context.push('/user-guide/aboutApp/aboutFCSC'); }, tileColor: Colors.white, - title: Text('About FCSC', - style: TextStyle( - fontSize:16, - color: Color(0xFF414042), - fontWeight: FontWeight.w500, + title: Text( + 'About FCSC', + style: TextStyle( + fontSize: 16, + color: Color(0xFF414042), + fontWeight: FontWeight.w500, fontFamily: 'Roboto', - ),), + ), + ), trailing: Icon(Icons.keyboard_arrow_right), ), ), Container( - decoration: BoxDecoration( - border: Border( - bottom: BorderSide(color: Colors.grey.shade300, width: 0.5), // Grey bottom line - ), - ), - child: ListTile( - onTap: (){ - context.push('/user-guide/aboutApp/getStarted'); - }, - // tileColor: Colors.white, - title: Text('How to Get Started?', - style: TextStyle( - fontSize:16, - color: Color(0xFF414042), - fontWeight: FontWeight.w500, - fontFamily: 'Roboto', + decoration: BoxDecoration( + border: Border( + bottom: BorderSide( + color: Colors.grey.shade300, + width: 0.5), // Grey bottom line ), ), - trailing: Icon(Icons.keyboard_arrow_right), - shape: Border( - bottom: BorderSide(color: Colors.black, width: 3), // Grey bottom line + child: ListTile( + onTap: () { + context.push('/user-guide/aboutApp/getStarted'); + }, + // tileColor: Colors.white, + title: Text( + 'How to Get Started?', + style: TextStyle( + fontSize: 16, + color: Color(0xFF414042), + fontWeight: FontWeight.w500, + fontFamily: 'Roboto', + ), + ), + trailing: Icon(Icons.keyboard_arrow_right), + shape: Border( + bottom: BorderSide( + color: Colors.black, width: 3), // Grey bottom line + ), ), - ), - ), Spacer(), Align( alignment: Alignment.bottomCenter, child: fcscBanner, ), - SizedBox(height: 25,), - ], + SizedBox( + height: 25, + ), + ], + ), ), - - ),); + ); } } 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 88652bac..26fd1f1d 100755 --- 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 @@ -13,211 +13,342 @@ class _FAQPageState extends State { @override Widget build(BuildContext context) { return BaseScaffold( - showBackButton: true, dividerColor: Colors.grey[300], appbarColor: Colors.white, bottomColor: Colors.white, mycenterTitle: true, title: Padding( - padding:EdgeInsets.only(bottom:8.0), - child: Text(' FAQs', + padding: EdgeInsets.only(bottom: 8.0), + child: Text( + ' FAQs', style: TextStyle( - fontSize:22, + fontSize: 22, color: Color(0xFF7DAFBC), fontWeight: FontWeight.w500, // fontWeight: FontWeight.w500, ), ), - ) , + ), body: SafeArea( child: Container( height: double.infinity, color: Colors.white, child: Scrollbar( - thumbVisibility: true, - thickness: 8, - radius: Radius.circular(10), - interactive: true, - child:SingleChildScrollView( - child: QuestionAnswerScrollView(), - ), + thumbVisibility: true, + thickness: 8, + radius: Radius.circular(10), + interactive: true, + child: SingleChildScrollView( + child: QuestionAnswerScrollView(), ), + ), ), - ), ); } - - - } + class QuestionAnswerScrollView extends StatelessWidget { const QuestionAnswerScrollView({super.key}); - - @override Widget build(BuildContext context) { final List> questionsAndAnswers = [ - {'question':'What is the purpose of this app?', 'answer': 'The app provides official UAE statistics across categories like Economy, Environment, and Social. It allows users to explore datasets, view trends, and access detailed metrics to make informed decisions.'}, - {'question':'Do I need to create an account to use the app?', 'answer':RichText( - text: TextSpan( - children: [ - TextSpan( - text: 'Yes, the app is strictly for registered and approved users. To access the data:\n\n', - style: TextStyle(color: Colors.grey, fontSize: 16, fontFamily: 'Roboto'), ), - TextSpan( - text: ' 1. You need to sign up using the Register Now option on the login screen.\n', - style: TextStyle(color: Colors.grey, fontSize: 16, fontFamily: 'Roboto'), ), - TextSpan( - text: ' 2. Your registration must be approved by the admin.\n', - style: TextStyle(color: Colors.grey, fontSize: 16, fontFamily: 'Roboto'), ), - - TextSpan( - text: " 3. Once approved, you can log in to access the app's features and datasets.\n\nGuest access is not available for this application.\n ", - style: TextStyle(color: Colors.grey, fontSize: 16, fontFamily: 'Roboto'), ), - ], + { + 'question': 'What is the purpose of this app?', + 'answer': + 'The app provides official UAE statistics across categories like Economy, Environment, and Social. It allows users to explore datasets, view trends, and access detailed metrics to make informed decisions.' + }, + { + 'question': 'Do I need to create an account to use the app?', + 'answer': RichText( + text: TextSpan( + children: [ + TextSpan( + text: + 'Yes, the app is strictly for registered and approved users. To access the data:\n\n', + style: TextStyle( + color: Colors.grey, fontSize: 16, fontFamily: 'Roboto'), + ), + TextSpan( + text: + ' 1. You need to sign up using the Register Now option on the login screen.\n', + style: TextStyle( + color: Colors.grey, fontSize: 16, fontFamily: 'Roboto'), + ), + TextSpan( + text: ' 2. Your registration must be approved by the admin.\n', + style: TextStyle( + color: Colors.grey, fontSize: 16, fontFamily: 'Roboto'), + ), + TextSpan( + text: + " 3. Once approved, you can log in to access the app's features and datasets.\n\nGuest access is not available for this application.\n ", + style: TextStyle( + color: Colors.grey, fontSize: 16, fontFamily: 'Roboto'), + ), + ], + ), ), - ),}, - {'question':'How can I navigate through the app?','answer':'• Use the main categories on the homepage (e.g., Economy, Environment) to access subcategories and detailed KPIs.\n• Drill down into specific metrics or graphical views by tapping on a KPI.\n• Access additional features like Bookmarks or Profile through the navigation bar.\n'}, - {'question':'What types of data are available?', 'answer':RichText( - text: TextSpan( - children: [ - TextSpan( - text: 'The app offers data on:\n\n', - style: TextStyle(color: Colors.grey, fontSize: 16, fontFamily: 'Roboto'), ), - TextSpan( - text: ' • Economy', - style: TextStyle(color: Color(0xFF414042),fontWeight: FontWeight.w500, fontSize: 16), ), - TextSpan( - text: ' GDP, growth rates, and economic trends\n', - style: TextStyle(color: Colors.grey, fontSize: 16, fontFamily: 'Roboto'), ), - - TextSpan( - text: ' • Environment:', - style: TextStyle(color: Color(0xFF414042),fontWeight: FontWeight.w500, fontSize: 16), ), - TextSpan( - text: ' Electricity production, water consumption, and more.\n', - style: TextStyle(color: Colors.grey, fontSize: 16, fontFamily: 'Roboto'), ), - TextSpan( - text: ' • Social:', - style: TextStyle(color: Color(0xFF414042),fontWeight: FontWeight.w500, fontSize: 16), ), - TextSpan( - text: ' Labor force distribution, participation rates, and demographic data.\n', - style: TextStyle(color: Colors.grey, fontSize: 16, fontFamily: 'Roboto'), ), - ], + }, + { + 'question': 'How can I navigate through the app?', + 'answer': + '• Use the main categories on the homepage (e.g., Economy, Environment) to access subcategories and detailed KPIs.\n• Drill down into specific metrics or graphical views by tapping on a KPI.\n• Access additional features like Bookmarks or Profile through the navigation bar.\n' + }, + { + 'question': 'What types of data are available?', + 'answer': RichText( + text: TextSpan( + children: [ + TextSpan( + text: 'The app offers data on:\n\n', + style: TextStyle( + color: Colors.grey, fontSize: 16, fontFamily: 'Roboto'), + ), + TextSpan( + text: ' • Economy', + style: TextStyle( + color: Color(0xFF414042), + fontWeight: FontWeight.w500, + fontSize: 16), + ), + TextSpan( + text: ' GDP, growth rates, and economic trends\n', + style: TextStyle( + color: Colors.grey, fontSize: 16, fontFamily: 'Roboto'), + ), + TextSpan( + text: ' • Environment:', + style: TextStyle( + color: Color(0xFF414042), + fontWeight: FontWeight.w500, + fontSize: 16), + ), + TextSpan( + text: ' Electricity production, water consumption, and more.\n', + style: TextStyle( + color: Colors.grey, fontSize: 16, fontFamily: 'Roboto'), + ), + TextSpan( + text: ' • Social:', + style: TextStyle( + color: Color(0xFF414042), + fontWeight: FontWeight.w500, + fontSize: 16), + ), + TextSpan( + text: + ' Labor force distribution, participation rates, and demographic data.\n', + style: TextStyle( + color: Colors.grey, fontSize: 16, fontFamily: 'Roboto'), + ), + ], + ), ), - ),}, - {'question':'How do I bookmark a metric?', 'answer': RichText( - text: TextSpan( - children: [ - TextSpan( - text: 'When viewing a metric, tap on the', - style: TextStyle(color: Colors.grey, fontSize: 16, fontFamily: 'Roboto'), ), - TextSpan( - text: ' Bookmark ', - style: TextStyle(color: Color(0xFF414042),fontWeight: FontWeight.w500, fontSize: 16), ), - TextSpan( - text: 'icon. Your bookmarks are accessible from the', - style: TextStyle(color: Colors.grey, fontSize: 16, fontFamily: 'Roboto'), ), - - TextSpan( - text: 'My Bookmarks', - style: TextStyle(color: Color(0xFF414042),fontWeight: FontWeight.w500, fontSize: 16), ), - TextSpan( - text: 'section in the navigation bar.\n', - style: TextStyle(color: Colors.grey, fontSize: 16, fontFamily: 'Roboto'), ), - ], + }, + { + 'question': 'How do I bookmark a metric?', + 'answer': RichText( + text: TextSpan( + children: [ + TextSpan( + text: 'When viewing a metric, tap on the', + style: TextStyle( + color: Colors.grey, fontSize: 16, fontFamily: 'Roboto'), + ), + TextSpan( + text: ' Bookmark ', + style: TextStyle( + color: Color(0xFF414042), + fontWeight: FontWeight.w500, + fontSize: 16), + ), + TextSpan( + text: 'icon. Your bookmarks are accessible from the', + style: TextStyle( + color: Colors.grey, fontSize: 16, fontFamily: 'Roboto'), + ), + TextSpan( + text: 'My Bookmarks', + style: TextStyle( + color: Color(0xFF414042), + fontWeight: FontWeight.w500, + fontSize: 16), + ), + TextSpan( + text: 'section in the navigation bar.\n', + style: TextStyle( + color: Colors.grey, fontSize: 16, fontFamily: 'Roboto'), + ), + ], + ), ), - ),}, - {'question':'Can I view the app in another language?', 'answer': RichText( - text: TextSpan( - children: [ - TextSpan( - text: 'Yes, the app supports both ', - style: TextStyle(color: Colors.grey, fontSize: 16, fontFamily: 'Roboto'), ), - TextSpan( - text: 'English ', - style: TextStyle(color: Color(0xFF414042),fontWeight: FontWeight.w500, fontSize: 16), ), - TextSpan( - text: 'and', - style: TextStyle(color: Colors.grey, fontSize: 16, fontFamily: 'Roboto'), ), - - TextSpan( - text: ' Arabic ', - style: TextStyle(color: Color(0xFF414042),fontWeight: FontWeight.w500, fontSize: 16), ), - TextSpan( - text: '. You can toggle the language using the switch in the top-right corner of the app.\n', - style: TextStyle(color: Colors.grey, fontSize: 16, fontFamily: 'Roboto'), ), - ], + }, + { + 'question': 'Can I view the app in another language?', + 'answer': RichText( + text: TextSpan( + children: [ + TextSpan( + text: 'Yes, the app supports both ', + style: TextStyle( + color: Colors.grey, fontSize: 16, fontFamily: 'Roboto'), + ), + TextSpan( + text: 'English ', + style: TextStyle( + color: Color(0xFF414042), + fontWeight: FontWeight.w500, + fontSize: 16), + ), + TextSpan( + text: 'and', + style: TextStyle( + color: Colors.grey, fontSize: 16, fontFamily: 'Roboto'), + ), + TextSpan( + text: ' Arabic ', + style: TextStyle( + color: Color(0xFF414042), + fontWeight: FontWeight.w500, + fontSize: 16), + ), + TextSpan( + text: + '. You can toggle the language using the switch in the top-right corner of the app.\n', + style: TextStyle( + color: Colors.grey, fontSize: 16, fontFamily: 'Roboto'), + ), + ], + ), ), - ),}, - {'question':'What happens if I forget my password?','answer':'Tap on the Forgot Password? link on the login page. Follow the steps to reset your password via your registered email address.\n'}, - {'question':'Can I edit my profile details?','answer': 'Yes, you can edit specific fields such as Date of Birth and User Image. However, certain fields like Username and Email are non-editable for security reasons.\n'}, - {'question':'How often is the data updated?','answer':'The app updates its datasets regularly to ensure users have access to the latest statistics. Notifications are sent whenever significant updates are made.\n'}, - {'question':'What types of graphs and charts are available?','answer':'The app provides a variety of visualizations, including:\n • Line charts for trends.\n • Bar and column charts for comparisons.\n • Stacked charts for multi-layered data views.\n'}, - {'question':'Can I share the data or charts?','answer':RichText( - text: TextSpan( - children: [ - TextSpan( - text: 'Yes, you can share data or charts directly from the app by tapping the ', - style: TextStyle(color: Colors.grey, fontSize: 16, fontFamily: 'Roboto'), ), - TextSpan( - text: 'Share ', - style: TextStyle(color: Color(0xFF414042),fontWeight: FontWeight.w500, fontSize: 16), ), - TextSpan( - text: 'button available on most pages.\n', - style: TextStyle(color: Colors.grey, fontSize: 16, fontFamily: 'Roboto'), ), - ], + }, + { + 'question': 'What happens if I forget my password?', + 'answer': + 'Tap on the Forgot Password? link on the login page. Follow the steps to reset your password via your registered email address.\n' + }, + { + 'question': 'Can I edit my profile details?', + 'answer': + 'Yes, you can edit specific fields such as Date of Birth and User Image. However, certain fields like Username and Email are non-editable for security reasons.\n' + }, + { + 'question': 'How often is the data updated?', + 'answer': + 'The app updates its datasets regularly to ensure users have access to the latest statistics. Notifications are sent whenever significant updates are made.\n' + }, + { + 'question': 'What types of graphs and charts are available?', + 'answer': + 'The app provides a variety of visualizations, including:\n • Line charts for trends.\n • Bar and column charts for comparisons.\n • Stacked charts for multi-layered data views.\n' + }, + { + 'question': 'Can I share the data or charts?', + 'answer': RichText( + text: TextSpan( + children: [ + TextSpan( + text: + 'Yes, you can share data or charts directly from the app by tapping the ', + style: TextStyle( + color: Colors.grey, fontSize: 16, fontFamily: 'Roboto'), + ), + TextSpan( + text: 'Share ', + style: TextStyle( + color: Color(0xFF414042), + fontWeight: FontWeight.w500, + fontSize: 16), + ), + TextSpan( + text: 'button available on most pages.\n', + style: TextStyle( + color: Colors.grey, fontSize: 16, fontFamily: 'Roboto'), + ), + ], + ), ), - ),}, - {'question':'What should I do if I encounter an issue?','answer':RichText( - text: TextSpan( - children: [ - TextSpan( - text: 'For technical support or feedback, navigate to the ', - style: TextStyle(color: Colors.grey, fontSize: 16, fontFamily: 'Roboto'), ), - TextSpan( - text: 'Help ', - style: TextStyle(color: Color(0xFF414042),fontWeight: FontWeight.w500, fontSize: 16), ), - TextSpan( - text: 'section in the app and contact the support team.\n', - style: TextStyle(color: Colors.grey, fontSize: 16, fontFamily: 'Roboto'), ), - ], + }, + { + 'question': 'What should I do if I encounter an issue?', + 'answer': RichText( + text: TextSpan( + children: [ + TextSpan( + text: 'For technical support or feedback, navigate to the ', + style: TextStyle( + color: Colors.grey, fontSize: 16, fontFamily: 'Roboto'), + ), + TextSpan( + text: 'Help ', + style: TextStyle( + color: Color(0xFF414042), + fontWeight: FontWeight.w500, + fontSize: 16), + ), + TextSpan( + text: 'section in the app and contact the support team.\n', + style: TextStyle( + color: Colors.grey, fontSize: 16, fontFamily: 'Roboto'), + ), + ], + ), ), - ),}, - {'question':'How do I log out of the app?','answer':RichText( - text: TextSpan( - children: [ - TextSpan( - text: 'Go to the ', - style: TextStyle(color: Colors.grey, fontSize: 16, fontFamily: 'Roboto'), ), - TextSpan( - text: 'Profile ', - style: TextStyle(color: Color(0xFF414042),fontWeight: FontWeight.w500, fontSize: 16), ), - TextSpan( - text: 'section and tap the ', - style: TextStyle(color: Colors.grey, fontSize: 16, fontFamily: 'Roboto'), ), - TextSpan( - text: 'Logout ', - style: TextStyle(color: Color(0xFF414042),fontWeight: FontWeight.w500, fontSize: 16), - ), - TextSpan( - text: 'option in the top-right corner.\n', - style: TextStyle(color: Colors.grey, fontSize: 16, fontFamily: 'Roboto'), ) ], + }, + { + 'question': 'How do I log out of the app?', + 'answer': RichText( + text: TextSpan( + children: [ + TextSpan( + text: 'Go to the ', + style: TextStyle( + color: Colors.grey, fontSize: 16, fontFamily: 'Roboto'), + ), + TextSpan( + text: 'Profile ', + style: TextStyle( + color: Color(0xFF414042), + fontWeight: FontWeight.w500, + fontSize: 16), + ), + TextSpan( + text: 'section and tap the ', + style: TextStyle( + color: Colors.grey, fontSize: 16, fontFamily: 'Roboto'), + ), + TextSpan( + text: 'Logout ', + style: TextStyle( + color: Color(0xFF414042), + fontWeight: FontWeight.w500, + fontSize: 16), + ), + TextSpan( + text: 'option in the top-right corner.\n', + style: TextStyle( + color: Colors.grey, fontSize: 16, fontFamily: 'Roboto'), + ) + ], + ), ), - ),}, + }, ]; return SingleChildScrollView( child: Column( - children: questionsAndAnswers.map((qa) => QuestionAnswerCard(qa: qa)).toList(), + children: questionsAndAnswers + .map((qa) => QuestionAnswerCard(qa: qa)) + .toList(), ), ); } } -class QuestionAnswerCard extends StatefulWidget { // Use dynamic to accommodate RichText +class QuestionAnswerCard extends StatefulWidget { + // Use dynamic to accommodate RichText const QuestionAnswerCard({super.key, required this.qa}); final Map qa; @@ -234,21 +365,24 @@ class _QuestionAnswerCardState extends State { return Card( color: Colors.white, shape: Border( - bottom: BorderSide(width: 0.5,color: Colors.grey.shade300), + bottom: BorderSide(width: 0.5, color: Colors.grey.shade300), + ), + margin: EdgeInsets.symmetric( + vertical: 0, ), - margin: EdgeInsets.symmetric(vertical: 0, ), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ ListTile( - dense: true, textColor: Color(0xFF414042), title: Text( widget.qa['question']!, style: TextStyle(fontWeight: FontWeight.w500, fontSize: 16), ), - trailing: Icon(isExpanded ? Icons.keyboard_arrow_up : Icons.keyboard_arrow_down), + trailing: Icon(isExpanded + ? Icons.keyboard_arrow_up + : Icons.keyboard_arrow_down), onTap: () { setState(() { isExpanded = !isExpanded; @@ -257,16 +391,20 @@ class _QuestionAnswerCardState extends State { ), if (isExpanded) Padding( - padding: const EdgeInsets.only(left: 16, right: 16, bottom: 16,top: 0), + padding: const EdgeInsets.only( + left: 16, right: 16, bottom: 16, top: 0), child: widget.qa['answer'] is RichText ? widget.qa['answer'] : Text( - widget.qa['answer'] ?? '', - style: TextStyle(color: Colors.grey, fontSize: 16, fontFamily: 'Roboto'), - ), + widget.qa['answer'] ?? '', + style: TextStyle( + color: Colors.grey, + fontSize: 16, + fontFamily: 'Roboto'), + ), ), ], ), ); } -} \ No newline at end of file +} diff --git a/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/features.dart b/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/features.dart index df22d2b5..ddb2c774 100755 --- a/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/features.dart +++ b/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/features.dart @@ -3,41 +3,38 @@ import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:go_router/go_router.dart'; import 'package:uae_stat/presentation/routes/drawer_routes/custom_drawer_routes.dart'; - import 'package:uae_stat/infrastructure/services/img_asset_paths/banner_asset_path.dart'; - - class UsingFeatures extends StatelessWidget { const UsingFeatures({super.key}); - @override Widget build(BuildContext context) { final fcscBanner = Image.asset( BannerAssetPath.fcsc, height: 56, - alignment:Alignment.center, + alignment: Alignment.center, ); - return BaseScaffold( showDivider: true, - showBackButton: true, + return BaseScaffold( + showDivider: true, dividerColor: Colors.grey[300], bottomColor: Colors.white, appbarColor: Colors.white, mycenterTitle: true, title: Padding( - padding:EdgeInsets.only(bottom:8.0), - child: Text('Key Features', + padding: EdgeInsets.only(bottom: 8.0), + child: Text( + 'Key Features', style: TextStyle( - fontSize:22, + fontSize: 22, fontFamily: 'Roboto', color: Color(0xFF7DAFBC), fontWeight: FontWeight.w500, // fontWeight: FontWeight.w500, ), ), - ) , - body: Container( + ), + body: Container( width: double.infinity, color: Colors.white, child: Column( @@ -45,38 +42,45 @@ class UsingFeatures extends StatelessWidget { Container( decoration: BoxDecoration( border: Border( - bottom: BorderSide(color: Colors.grey.shade300, width: 0.5), // Grey bottom line + bottom: BorderSide( + color: Colors.grey.shade300, + width: 0.5), // Grey bottom line ), ), child: ListTile( - onTap: (){ + onTap: () { context.push('/user-guide/features/appFeatures'); }, tileColor: Colors.white, - title: Text('App Features', + title: Text( + 'App Features', style: TextStyle( - fontSize:16, + fontSize: 16, color: Color(0xFF414042), fontWeight: FontWeight.w500, fontFamily: 'Roboto', - ),), + ), + ), trailing: Icon(Icons.keyboard_arrow_right), ), ), Container( decoration: BoxDecoration( border: Border( - bottom: BorderSide(color: Colors.grey.shade300, width: 0.5), // Grey bottom line + bottom: BorderSide( + color: Colors.grey.shade300, + width: 0.5), // Grey bottom line ), ), child: ListTile( - onTap: (){ + onTap: () { context.push('/user-guide/features/whoUseApp'); }, // tileColor: Colors.white, - title: Text('Who can use The App', + title: Text( + 'Who can use The App', style: TextStyle( - fontSize:16, + fontSize: 16, color: Color(0xFF414042), fontWeight: FontWeight.w500, fontFamily: 'Roboto', @@ -84,25 +88,28 @@ class UsingFeatures extends StatelessWidget { ), trailing: Icon(Icons.keyboard_arrow_right), shape: Border( - bottom: BorderSide(color: Colors.black, width: 3), // Grey bottom line + bottom: BorderSide( + color: Colors.black, width: 3), // Grey bottom line ), - ), ), Container( decoration: BoxDecoration( border: Border( - bottom: BorderSide(color: Colors.grey.shade300, width: 0.5), // Grey bottom line + bottom: BorderSide( + color: Colors.grey.shade300, + width: 0.5), // Grey bottom line ), ), child: ListTile( - onTap: (){ + onTap: () { context.push('/user-guide/features/purpose'); }, // tileColor: Colors.white, - title: Text('Purpose of the App ?', + title: Text( + 'Purpose of the App ?', style: TextStyle( - fontSize:16, + fontSize: 16, color: Color(0xFF414042), fontWeight: FontWeight.w500, fontFamily: 'Roboto', @@ -110,25 +117,28 @@ class UsingFeatures extends StatelessWidget { ), trailing: Icon(Icons.keyboard_arrow_right), shape: Border( - bottom: BorderSide(color: Colors.black, width: 3), // Grey bottom line + bottom: BorderSide( + color: Colors.black, width: 3), // Grey bottom line ), - ), ), Container( decoration: BoxDecoration( border: Border( - bottom: BorderSide(color: Colors.grey.shade300, width: 0.5), // Grey bottom line + bottom: BorderSide( + color: Colors.grey.shade300, + width: 0.5), // Grey bottom line ), ), child: ListTile( - onTap: (){ + onTap: () { context.push('/user-guide/features/howUseApp'); }, // tileColor: Colors.white, - title: Text('How to Use the App', + title: Text( + 'How to Use the App', style: TextStyle( - fontSize:16, + fontSize: 16, color: Color(0xFF414042), fontWeight: FontWeight.w500, fontFamily: 'Roboto', @@ -136,25 +146,28 @@ class UsingFeatures extends StatelessWidget { ), trailing: Icon(Icons.keyboard_arrow_right), shape: Border( - bottom: BorderSide(color: Colors.black, width: 3), // Grey bottom line + bottom: BorderSide( + color: Colors.black, width: 3), // Grey bottom line ), - ), ), Container( decoration: BoxDecoration( border: Border( - bottom: BorderSide(color: Colors.grey.shade300, width: 0.5), // Grey bottom line + bottom: BorderSide( + color: Colors.grey.shade300, + width: 0.5), // Grey bottom line ), ), child: ListTile( - onTap: (){ + onTap: () { context.push('/user-guide/features/stayUpdated'); }, // tileColor: Colors.white, - title: Text('Stay Updated', + title: Text( + 'Stay Updated', style: TextStyle( - fontSize:16, + fontSize: 16, color: Color(0xFF414042), fontWeight: FontWeight.w500, fontFamily: 'Roboto', @@ -162,25 +175,28 @@ class UsingFeatures extends StatelessWidget { ), trailing: Icon(Icons.keyboard_arrow_right), shape: Border( - bottom: BorderSide(color: Colors.black, width: 3), // Grey bottom line + bottom: BorderSide( + color: Colors.black, width: 3), // Grey bottom line ), - ), ), Container( decoration: BoxDecoration( border: Border( - bottom: BorderSide(color: Colors.grey.shade300, width: 0.5), // Grey bottom line + bottom: BorderSide( + color: Colors.grey.shade300, + width: 0.5), // Grey bottom line ), ), child: ListTile( - onTap: (){ + onTap: () { context.push('/user-guide/features/changeMyPassword'); }, // tileColor: Colors.white, - title: Text('How to Change My Password', + title: Text( + 'How to Change My Password', style: TextStyle( - fontSize:16, + fontSize: 16, color: Color(0xFF414042), fontWeight: FontWeight.w500, fontFamily: 'Roboto', @@ -188,25 +204,28 @@ class UsingFeatures extends StatelessWidget { ), trailing: Icon(Icons.keyboard_arrow_right), shape: Border( - bottom: BorderSide(color: Colors.black, width: 3), // Grey bottom line + bottom: BorderSide( + color: Colors.black, width: 3), // Grey bottom line ), - ), ), Container( decoration: BoxDecoration( border: Border( - bottom: BorderSide(color: Colors.grey.shade300, width: 0.5), // Grey bottom line + bottom: BorderSide( + color: Colors.grey.shade300, + width: 0.5), // Grey bottom line ), ), child: ListTile( - onTap: (){ + onTap: () { context.push('/user-guide/features/editMyProfile'); }, // tileColor: Colors.white, - title: Text('How to Edit My Profile', + title: Text( + 'How to Edit My Profile', style: TextStyle( - fontSize:16, + fontSize: 16, color: Color(0xFF414042), fontWeight: FontWeight.w500, fontFamily: 'Roboto', @@ -214,9 +233,9 @@ class UsingFeatures extends StatelessWidget { ), trailing: Icon(Icons.keyboard_arrow_right), shape: Border( - bottom: BorderSide(color: Colors.black, width: 3), // Grey bottom line + bottom: BorderSide( + color: Colors.black, width: 3), // Grey bottom line ), - ), ), Spacer(), @@ -224,11 +243,12 @@ class UsingFeatures extends StatelessWidget { alignment: Alignment.bottomCenter, child: fcscBanner, ), - SizedBox(height: 30,), + SizedBox( + height: 30, + ), ], ), - - ),); - + ), + ); } } diff --git a/lib/presentation/routes/drawer_routes/custom_drawer_routes.dart b/lib/presentation/routes/drawer_routes/custom_drawer_routes.dart index 3ef74df7..9f95fbbf 100644 --- a/lib/presentation/routes/drawer_routes/custom_drawer_routes.dart +++ b/lib/presentation/routes/drawer_routes/custom_drawer_routes.dart @@ -28,17 +28,17 @@ class BaseScaffold extends ConsumerStatefulWidget { required this.body, required this.title, this.actions, - this.showDivider =false, - this.dividerColor , + this.showDivider = false, + this.dividerColor, this.showBackButton = false, this.mycenterTitle = false, this.appbarColor, this.mytitleColor, - this.bottomColor=null, + this.bottomColor = null, }); final Widget body; final Widget title; - final Color? dividerColor; + final Color? dividerColor; final bool showDivider; final bool showBackButton; final bool? mycenterTitle; @@ -622,19 +622,20 @@ class _BaseScaffoldState extends ConsumerState { double mywidth = MediaQuery.of(context).size.width; return Scaffold( - backgroundColor: Colors.white, + backgroundColor: Colors.white, appBar: AppBar( title: widget.title, backgroundColor: Colors.white, leadingWidth: widget.showBackButton ? mywidth * 0.25 : null, bottom: widget.showDivider ? PreferredSize( - preferredSize: Size.fromHeight(1), // Height of the line - child: Container( - color: widget.dividerColor, // Line color - height: 1, // Line thickness - ), - ): null, + preferredSize: Size.fromHeight(1), // Height of the line + child: Container( + color: widget.dividerColor, // Line color + height: 1, // Line thickness + ), + ) + : null, actions: widget.actions ?? [ // IconButton( @@ -672,10 +673,8 @@ class _BaseScaffoldState extends ConsumerState { builder: (BuildContext context) { return IconButton( key: drawerKey, - color: (widget.showBackButton == true) - ? Colors.white - : Colors.black, - icon: const Icon(Icons.menu), + color: Colors.black, + icon: const Icon(Icons.menu, size: 30), onPressed: () { Scaffold.of(context).openDrawer(); }, @@ -763,13 +762,13 @@ class _BaseScaffoldState extends ConsumerState { ListTile( leading: Image.asset( DrawerAssetIconPath.feedback, - color: Colors.black , + color: Colors.black, width: 20, height: 20, ), // title: const Text('Feedback'), title: Text(AppLocalizations.of(context)!.feedback_title), -onTap: () => context.go('/feedback', extra: userName), + onTap: () => context.go('/feedback', extra: userName), ), if (role == 'admin') ListTile( @@ -854,7 +853,7 @@ onTap: () => context.go('/feedback', extra: userName), ), ])), bottomNavigationBar: BottomNavigationBar( - backgroundColor: widget.bottomColor ?? null, + backgroundColor: Colors.white, currentIndex: _getSelectedIndex(currentRoute), onTap: (index) => _onItemTapped(context, index), type: BottomNavigationBarType.fixed, diff --git a/pubspec.yaml b/pubspec.yaml index 18129944..75073021 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -128,6 +128,8 @@ flutter: - assets/feedback/smilingopenface.png - assets/feedback/errorfb.png - assets/feedback/thumbfb.png + - assets/user_guide/ + - assets/app_tour/ fonts: - family: Segoe