bug fix app left out

This commit is contained in:
Juki-shiba 2025-02-13 12:45:28 +05:30
parent 493312e091
commit 93936aeb46
12 changed files with 382 additions and 260 deletions

View File

@ -1,11 +1,14 @@
import 'package:external_repos/external_repos.dart'; import 'package:external_repos/external_repos.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:go_router/go_router.dart'; import 'package:go_router/go_router.dart';
import 'package:pocketbase/pocketbase.dart'; import 'package:pocketbase/pocketbase.dart';
import 'package:uae_stat/config/my_router.dart'; import 'package:uae_stat/config/my_router.dart';
import 'package:uae_stat/domain/use_cases/language.dart'; import 'package:uae_stat/domain/use_cases/language.dart';
import 'package:uae_stat/infrastructure/services/img_asset_paths/icons/misc_icon_asset_path.dart'; import 'package:uae_stat/infrastructure/services/img_asset_paths/icons/misc_icon_asset_path.dart';
import 'package:uae_stat/presentation/Screens/profilepage.dart'; import 'package:uae_stat/presentation/Screens/profilepage.dart';
import 'package:uae_stat/presentation/components/indicators/locale_provider.dart';
import 'package:uae_stat/presentation/components/my_toggle.dart';
import 'package:uae_stat/presentation/components/space.dart'; import 'package:uae_stat/presentation/components/space.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart';
@ -209,29 +212,46 @@ class _CreateNewPwState extends State<CreateNewPw> {
child: Column( child: Column(
children: [ children: [
// SizedBox(height: screenHeight / 7), // SizedBox(height: screenHeight / 7),
Align( Row(
alignment: Alignment.topLeft, mainAxisAlignment: MainAxisAlignment.spaceBetween,
child: GestureDetector( children: [
onTap: () { GestureDetector(
onTap: () {
if (widget.keyParam == 'editProfile') { if (widget.keyParam == 'editProfile') {
context.go('/editProfile'); context.go('/editProfile');
}else }else
{ {
context.go('/profile/${widget.userId}'); context.go('/profile/${widget.userId}');
} }
}, },
child: Container( child: Container(
margin: EdgeInsets.only(top: 10,left: 1,bottom: 16,right: 1), // Add margin for positioning margin: EdgeInsets.only(top: 10,left: 1,bottom: 16,right: 1), // Add margin for positioning
child: Icon( child: Icon(
// Icons.close, // Icons.close,
Icons.arrow_back_ios, Icons.arrow_back_ios,
size: 28, // Icon size size: 28, // Icon size
color: Colors.black, // Icon color color: Colors.black, // Icon color
),
), ),
), ), // Left icon
), Consumer(
builder: (context, ref, _) {
final locale = ref.watch(localeProvider); // Current locale
return MyToggle(
isOn: locale?.languageCode == 'en',
knobTextWhenOn: 'ع',
knobTextWhenOff: 'EN',
pathColorWhenOn: Colors.grey.shade300,
pathColorWhenOff: Colors.grey.shade300,
onTap: () {
ref.read(localeProvider.notifier).toggleLocale();
},
);
},
),// Right icon
],
), ),
SizedBox(height: screenHeight / 30), SizedBox(height: screenHeight / 30),
@ -575,7 +595,7 @@ class _CreateNewPwState extends State<CreateNewPw> {
SizedBox(width: 2), SizedBox(width: 2),
Icon( Icon(
Icons.arrow_forward_ios, Icons.arrow_forward_ios,
color: Colors.white38, color: Colors.white,
size: 18, size: 18,
), ),
], ],

View File

@ -266,20 +266,34 @@ class _RegisterScreenState extends ConsumerState<RegisterScreen> {
context: context, context: context,
builder: (context) { builder: (context) {
return AlertDialog( return AlertDialog(
title: Text('Email Exists'), backgroundColor: Colors.white,
title: Text(context.translate( 'Email Exists','البريد الإلكتروني موجود'),),
content: Text( content: Text(
'Email ID already exists. Please use a different email.'), context.translate( 'Email ID already exists. Please use a different email.',
'معرف البريد الإلكتروني موجود بالفعل. يرجى استخدام بريد إلكتروني آخر.'
),),
actions: [ actions: [
TextButton( TextButton(
onPressed: () { onPressed: () {
Navigator.pop(context); Navigator.pop(context);
setState(() { setState(() {
isRegistering = isRegistering =
false; // Re-enable the button after error false; // Re-enable the button after error
}); });
}, },
child: Text('OK'), style: TextButton.styleFrom(
backgroundColor: Color(0xFFAA8E83), // Set background color
foregroundColor: Colors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0), // Set text color
),
),
child: Text(
context.translate('Ok','حسنًا'),
style: TextStyle(color: Colors.white, fontSize: 16),
),
), ),
], ],
); );
}, },
@ -349,28 +363,23 @@ class _RegisterScreenState extends ConsumerState<RegisterScreen> {
children: [ children: [
Align( Align(
alignment: AlignmentDirectional.topEnd, alignment: AlignmentDirectional.topEnd,
child: Consumer( child: Padding(
builder: (context, ref, _) { padding: EdgeInsets.only(top: 16.0, right :16.0),
final locale = ref.watch(localeProvider); // Current locale child: Consumer(
return MyToggle( builder: (context, ref, _) {
isOn: locale?.languageCode == 'en', final locale = ref.watch(localeProvider); // Current locale
knobTextWhenOn: 'ع', return MyToggle(
knobTextWhenOff: 'EN', isOn: locale?.languageCode == 'en',
pathColorWhenOn: Colors.grey.shade300, knobTextWhenOn: 'ع',
pathColorWhenOff: Colors.grey.shade300, knobTextWhenOff: 'EN',
onTap: () { pathColorWhenOn: Colors.grey.shade300,
ref.read(localeProvider.notifier).toggleLocale(); pathColorWhenOff: Colors.grey.shade300,
}, onTap: () {
); ref.read(localeProvider.notifier).toggleLocale();
// IconButton( },
// icon: Icon(locale?.languageCode == 'en' );
// ? Icons.toggle_off_outlined },
// : Icons.toggle_on_outlined,), ),
// onPressed: () {
// ref.read(localeProvider.notifier).toggleLocale();
// },
// );
},
), ),
), ),
Container( Container(
@ -522,7 +531,13 @@ class _RegisterScreenState extends ConsumerState<RegisterScreen> {
), ),
SizedBox(height: 10), SizedBox(height: 10),
Text(AppLocalizations.of(context)! Text(AppLocalizations.of(context)!
.register_details), .register_details,
style: TextStyle(
fontSize: context.translate(18.0, 14.0),
color: const Color(0xff898C81),
fontWeight: FontWeight.w600,
),
),
SizedBox(height: 20), SizedBox(height: 20),
// Display this if registration is pending approval // Display this if registration is pending approval
@ -951,8 +966,8 @@ class _RegisterScreenState extends ConsumerState<RegisterScreen> {
left: 25, left: 25,
right: 30), right: 30),
child: Row( child: Row(
mainAxisAlignment: crossAxisAlignment:
MainAxisAlignment.start, CrossAxisAlignment.start,
children: [ children: [
Checkbox( Checkbox(
value: isChecked, value: isChecked,
@ -964,15 +979,17 @@ class _RegisterScreenState extends ConsumerState<RegisterScreen> {
}, },
side: BorderSide( side: BorderSide(
color: showError color: showError
? Color(0xFF7296BE) ? Color(0xFFb22222)
: Color(0xFF7DAFBC), : MyTheme.topicColor(
IndicatorTopic.economy)
.shade400,
width: 1, width: 1,
), ),
), ),
Expanded( Expanded(
child: Padding( child: Padding(
padding: const EdgeInsets.only( padding: const EdgeInsets.only(
top: 11.0), top: 13.0),
child: Text.rich( child: Text.rich(
TextSpan( TextSpan(
text: AppLocalizations.of( text: AppLocalizations.of(
@ -980,8 +997,14 @@ class _RegisterScreenState extends ConsumerState<RegisterScreen> {
.agree, .agree,
// text: 'I agree to ', // text: 'I agree to ',
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.w500,
fontSize: registerLocale
?.languageCode ==
'ar'
? 12
: 14,
color: Color( color: Color(
0xFF898C81), // Change to your desired color 0xFF898C81,), // Change to your desired color
), ),
children: [ children: [
TextSpan( TextSpan(
@ -1047,6 +1070,12 @@ class _RegisterScreenState extends ConsumerState<RegisterScreen> {
context)! context)!
.conditions, .conditions,
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.w500,
fontSize: registerLocale
?.languageCode ==
'ar'
? 12
: 14,
color: Color( color: Color(
0xFF898C81), // Change to your desired color 0xFF898C81), // Change to your desired color
), ),
@ -1065,17 +1094,26 @@ class _RegisterScreenState extends ConsumerState<RegisterScreen> {
MainAxisAlignment.start, MainAxisAlignment.start,
children: [ children: [
Padding( Padding(
padding: const EdgeInsets.only( padding: EdgeInsets.only(
left: 30.0), left:registerLocale
?.languageCode ==
'ar'
? 0
: 30.0,
right: registerLocale
?.languageCode ==
'ar'
? 30
: 0.0,),
child: Text( child: Text(
'Required', 'Required',
style: TextStyle( style: TextStyle(
color: Color(0xFFb22222), color: Color(0xFFb22222),
fontSize: registerLocale fontSize: registerLocale
?.languageCode == ?.languageCode ==
'ar' 'ar'
? 12 ? 12
: 14, : 12,
), ),
), ),
), ),
@ -1133,6 +1171,7 @@ class _RegisterScreenState extends ConsumerState<RegisterScreen> {
AppLocalizations.of(context)! AppLocalizations.of(context)!
.account_confirmation, .account_confirmation,
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.w500,
fontSize: fontSize:
registerLocale?.languageCode == registerLocale?.languageCode ==
'ar' 'ar'

View File

@ -449,7 +449,7 @@ class LoginRoute extends HookConsumerWidget {
'Roboto', 'Roboto',
'Roboto', 'Roboto',
), ),
fontSize: locale?.languageCode == 'ar' ? 16: 18, fontSize: locale?.languageCode == 'ar' ? 14: 18,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
) )
), ),
@ -565,7 +565,8 @@ class LoginRoute extends HookConsumerWidget {
'Don\'t have an account? ', 'Don\'t have an account? ',
'ليس لديك حساب؟', 'ليس لديك حساب؟',
), ),
style: const TextStyle( style: TextStyle(
fontSize: locale?.languageCode == 'ar' ? 12 : 14,
color: Color(0xff898C81), color: Color(0xff898C81),
), ),
), ),
@ -648,36 +649,43 @@ class LoginRoute extends HookConsumerWidget {
final screenWidth = MediaQuery.of(context).size.width; final screenWidth = MediaQuery.of(context).size.width;
final listViewHorizontalPadding = final listViewHorizontalPadding =
screenWidth < 700 ? 30 : 30 + (screenWidth - 700) / 2; screenWidth < 700 ? 30 : 30 + (screenWidth - 700) / 2;
final scaffoldBody = ListView( final scaffoldBody = SingleChildScrollView(
padding: EdgeInsets.symmetric( child: Column(
horizontal: listViewHorizontalPadding.toDouble(), children:[
Padding(
padding: EdgeInsets.all(16),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
3.verticalSpace,
Align(
alignment: AlignmentDirectional.topEnd,
child: MyToggle(
isOn: locale?.languageCode == 'en',
knobTextWhenOn: 'ع',
knobTextWhenOff: 'EN',
pathColorWhenOn: Colors.grey.shade300,
pathColorWhenOff: Colors.grey.shade300,
onTap: () {
ref.read(localeProvider.notifier).toggleLocale();
},
),
),
34.verticalSpace,
helloAndPleaseLoginTexts,
40.verticalSpace,
form,
15.verticalSpace,
dontHaveAnAccountRegisterBtn,
// continueAsGuestBtn,
// Spacer(),
15.verticalSpace,
fcscBanner,
],
),
)
]
), ),
children: [
3.verticalSpace,
Align(
alignment: AlignmentDirectional.topEnd,
child: MyToggle(
isOn: locale?.languageCode == 'en',
knobTextWhenOn: 'ع',
knobTextWhenOff: 'EN',
pathColorWhenOn: Colors.grey.shade300,
pathColorWhenOff: Colors.grey.shade300,
onTap: () {
ref.read(localeProvider.notifier).toggleLocale();
},
),
),
36.verticalSpace,
helloAndPleaseLoginTexts,
42.verticalSpace,
form,
15.verticalSpace,
dontHaveAnAccountRegisterBtn,
20.verticalSpace,
// continueAsGuestBtn,
95.verticalSpace,
fcscBanner,
],
); );
// final bgScaffold = Scaffold( // final bgScaffold = Scaffold(
// backgroundColor: Colors.white, // backgroundColor: Colors.white,
@ -688,7 +696,8 @@ class LoginRoute extends HookConsumerWidget {
canPop: false, // Allow back navigation only if not login screen canPop: false, // Allow back navigation only if not login screen
onPopInvokedWithResult: (didPop, result) { onPopInvokedWithResult: (didPop, result) {
if (didPop) return; if (didPop) return;
_showExitConfirmation(context); // Show exit confirmation dialog SystemNavigator.pop();
// _showExitConfirmation(context); // Show exit confirmation dialog
}, },
child: Scaffold( child: Scaffold(
backgroundColor: Colors.white, backgroundColor: Colors.white,
@ -696,64 +705,64 @@ class LoginRoute extends HookConsumerWidget {
), ),
); );
} }
//when the pop up need un comment the code
void _showExitConfirmation(BuildContext context) { // void _showExitConfirmation(BuildContext context) {
showDialog( // showDialog(
context: context, // context: context,
builder: (context) => AlertDialog( // builder: (context) => AlertDialog(
title: Text( context.translate( // title: Text( context.translate(
'Exit App', // 'Exit App',
'الخروج من التطبيق', // 'الخروج من التطبيق',
),style: TextStyle(color: Color(0xFF898C81),fontWeight: FontWeight.w700),), // ),style: TextStyle(color: Color(0xFF898C81),fontWeight: FontWeight.w700),),
content: Text( context.translate( // content: Text( context.translate(
'Are you sure you want to exit?', // 'Are you sure you want to exit?',
'هل أنت متأكد أنك تريد الخروج؟', // 'هل أنت متأكد أنك تريد الخروج؟',
), // ),
style: TextStyle(color:Color(0xFF898C81)), // style: TextStyle(color:Color(0xFF898C81)),
), // ),
actions: [ // actions: [
TextButton( // TextButton(
onPressed: () => Navigator.of(context).pop(), // Close dialog // onPressed: () => Navigator.of(context).pop(), // Close dialog
style: TextButton.styleFrom( // style: TextButton.styleFrom(
foregroundColor: Color(0xFFAA8E83), // Background color // foregroundColor: Color(0xFFAA8E83), // Background color
// backgroundColor: Colors.white, // Font (text) color // // backgroundColor: Colors.white, // Font (text) color
side: BorderSide( // side: BorderSide(
// color: Color(0xFF92722A)), // Border outline color // // color: Color(0xFF92722A)), // Border outline color
color: Color(0xFFAA8E83)), // Border outline color // color: Color(0xFFAA8E83)), // Border outline color
shape: RoundedRectangleBorder( // shape: RoundedRectangleBorder(
borderRadius: // borderRadius:
BorderRadius.circular(8), // Optional: Rounded corners // BorderRadius.circular(8), // Optional: Rounded corners
), // ),
padding: EdgeInsets.symmetric( // padding: EdgeInsets.symmetric(
horizontal: 16, vertical: 12), // Optional: Padding // horizontal: 16, vertical: 12), // Optional: Padding
), // ),
child: Text( context.translate( // child: Text( context.translate(
'Cancel', // 'Cancel',
'إلغاء', // 'إلغاء',
),), // ),),
), // ),
TextButton( // TextButton(
onPressed: () => SystemNavigator.pop(), // Exit the app // onPressed: () => SystemNavigator.pop(), // Exit the app
style: TextButton.styleFrom( // style: TextButton.styleFrom(
backgroundColor: Color(0xFFAA8E83), // Background color // backgroundColor: Color(0xFFAA8E83), // Background color
foregroundColor: Colors.white, // Font (text) color // foregroundColor: Colors.white, // Font (text) color
side: BorderSide( // side: BorderSide(
// color: Color(0xFF92722A)), // Border outline color // // color: Color(0xFF92722A)), // Border outline color
color: Color(0xFFAA8E83)), // Border outline color // color: Color(0xFFAA8E83)), // Border outline color
shape: RoundedRectangleBorder( // shape: RoundedRectangleBorder(
borderRadius: // borderRadius:
BorderRadius.circular(8), // Optional: Rounded corners // BorderRadius.circular(8), // Optional: Rounded corners
), // ),
padding: EdgeInsets.symmetric( // padding: EdgeInsets.symmetric(
horizontal: 16, vertical: 12), // Optional: Padding // horizontal: 16, vertical: 12), // Optional: Padding
), // ),
child: Text( context.translate( // child: Text( context.translate(
'Exit', // 'Exit',
'خروج', // 'خروج',
),), // ),),
), // ),
], // ],
), // ),
); // );
} // }
} }

View File

@ -1,6 +1,7 @@
import 'dart:convert'; import 'dart:convert';
import 'dart:io'; import 'dart:io';
import 'package:external_repos/external_repos.dart';
import 'package:flutter/gestures.dart'; import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
@ -11,6 +12,7 @@ import 'package:intl/intl.dart';
import 'package:pocketbase/pocketbase.dart'; import 'package:pocketbase/pocketbase.dart';
import 'package:shared_preferences/shared_preferences.dart'; import 'package:shared_preferences/shared_preferences.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import 'package:uae_stat/config/my_theme.dart';
import 'package:uae_stat/infrastructure/services/img_asset_paths/icons/misc_icon_asset_path.dart'; import 'package:uae_stat/infrastructure/services/img_asset_paths/icons/misc_icon_asset_path.dart';
import 'package:uae_stat/presentation/routes/drawer_routes/custom_drawer_routes.dart'; import 'package:uae_stat/presentation/routes/drawer_routes/custom_drawer_routes.dart';
@ -824,8 +826,10 @@ class _EditProfileState extends State<EditProfile> {
}, },
side: BorderSide( side: BorderSide(
color: showError color: showError
? Colors.red ? Color(0xFFb22222)
: Colors.grey, : MyTheme.topicColor(
IndicatorTopic.economy)
.shade400,
width: 1.5, width: 1.5,
), ),
), ),
@ -1060,7 +1064,7 @@ class ConfirmationDialog extends StatelessWidget {
TextSpan( TextSpan(
text: 'Country', text: 'Country',
style: style:
TextStyle(fontWeight: FontWeight.w700), // Bold for "name" TextStyle(fontWeight: FontWeight.w500), // Bold for "name"
), ),
TextSpan( TextSpan(
text: ' or ', text: ' or ',

View File

@ -291,33 +291,64 @@ class _ManageUserRouterState extends State<ManageUserRouter> {
// ), // ),
// onChanged: filterUsers, // onChanged: filterUsers,
// ), // ),
// Container(
// height: 40,
// decoration: BoxDecoration(
// color: Colors.white,
// borderRadius: BorderRadius.circular(30.0),
// border: Border.all(width: 2, color: Color(0xFFAA8E83)),
// ),
// child: TextField(
// decoration: InputDecoration(
// hintText: AppLocalizations.of(context)!.search,
// hintStyle: TextStyle(color: Color(0xFFC3C6CB)),
// prefixIcon: Image.asset(
// MiscIconAssetPath.search,
// width: 20,
// height: 20,
// ),
// // ,prefixIcon: Icon(
// // Icons.search,
// // color: Color(0xFFAA8E83),
// // ),
// border: InputBorder.none,
// contentPadding: EdgeInsets.symmetric(
// vertical: 15.0, horizontal: 20.0),
// ),
// onChanged: filterUsers,
// ),
// ),
Container( Container(
height: 40,
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
borderRadius: BorderRadius.circular(30.0), borderRadius: BorderRadius.circular(30.0),
border: Border.all(width: 2, color: Color(0xFFAA8E83)), border: Border.all(width: 1, color: Color(0xFFAA8E83)),
), ),
child: TextField( child: Padding(
decoration: InputDecoration( padding: EdgeInsets.only(left: 12.0),
labelStyle:TextStyle( child: TextField(
color:Color(0xFFC3C6CB), decoration: InputDecoration(
hintText: "Search",
hintStyle: TextStyle(color: Color(0xFF898C81)),
prefixIcon: Image(
image: ExactAssetImage(MiscIconAssetPath.search),
width: 24,
height: 24,
), ),
hintText: AppLocalizations.of(context)!.search,
prefixIcon: Image.asset(
MiscIconAssetPath.search, // prefixIcon: Image.asset(
width: 20, // MiscIconAssetPath.search,
height: 20, // // fit: BoxFit.contain,
// ),
border: InputBorder.none,
contentPadding:
EdgeInsets.symmetric(vertical: 8.0, horizontal: 18.0),
), ),
// ,prefixIcon: Icon( ),),
// Icons.search,
// color: Color(0xFFAA8E83),
// ),
border: InputBorder.none,
contentPadding: EdgeInsets.symmetric(
vertical: 15.0, horizontal: 20.0),
),
onChanged: filterUsers,
),
), ),
SizedBox(height: myheight / 40), SizedBox(height: myheight / 40),
filteredUserData.isEmpty filteredUserData.isEmpty

View File

@ -1,4 +1,5 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
import '../../custom_drawer_routes.dart'; import '../../custom_drawer_routes.dart';
class NotificationPage extends StatefulWidget { class NotificationPage extends StatefulWidget {
@ -26,67 +27,74 @@ class _NotificationPageState extends State<NotificationPage> {
? notifications ? notifications
: notifications.where((notification) => notification["category"] == tabs[selectedTabIndex]).toList(); : notifications.where((notification) => notification["category"] == tabs[selectedTabIndex]).toList();
return BaseScaffold( return PopScope(
title: Text('Notification'), canPop: false,
body: Column( onPopInvokedWithResult: (didPop, result) {
children: [ if (didPop) return;
TabBarHeader( context.go('/myhomepage');
tabs: tabs, },
selectedIndex: selectedTabIndex, child: BaseScaffold(
onTabSelected: (index) { title: Text('Notification'),
setState(() { body: Column(
selectedTabIndex = index; children: [
}); TabBarHeader(
}, tabs: tabs,
), selectedIndex: selectedTabIndex,
Expanded( onTabSelected: (index) {
child: selectedTabIndex == 1 setState(() {
? Center( selectedTabIndex = index;
child: Column( });
mainAxisAlignment: MainAxisAlignment.center,
children: [
Image.asset(
'assets/backgrounds/Notification/Update_notific.png',
height: 200,
),
SizedBox(height: 16),
Text(
filteredNotifications.isNotEmpty
? filteredNotifications[0]['title']
: 'No updates available.',
style: TextStyle(fontSize: 16, color: Colors.grey),
textAlign: TextAlign.center,
),
],
),
)
: filteredNotifications.isEmpty
? Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Icon(Icons.info_outline, size: 100, color: Colors.grey[400]),
SizedBox(height: 16),
Text(
'No notifications available.',
style: TextStyle(fontSize: 16, color: Colors.grey),
),
],
),
)
: ListView.builder(
itemCount: filteredNotifications.length,
itemBuilder: (context, index) {
final notification = filteredNotifications[index];
return NotificationTile(
title: notification["title"]!,
date: notification["date"]!,
category: notification["category"]!,
);
}, },
), ),
), Expanded(
], child: selectedTabIndex == 1
? Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Image.asset(
'assets/backgrounds/Notification/Update_notific.png',
height: 200,
),
SizedBox(height: 16),
Text(
filteredNotifications.isNotEmpty
? filteredNotifications[0]['title']
: 'No updates available.',
style: TextStyle(fontSize: 16, color: Colors.grey),
textAlign: TextAlign.center,
),
],
),
)
: filteredNotifications.isEmpty
? Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Icon(Icons.info_outline, size: 100, color: Colors.grey[400]),
SizedBox(height: 16),
Text(
'No notifications available.',
style: TextStyle(fontSize: 16, color: Colors.grey),
),
],
),
)
: ListView.builder(
itemCount: filteredNotifications.length,
itemBuilder: (context, index) {
final notification = filteredNotifications[index];
return NotificationTile(
title: notification["title"]!,
date: notification["date"]!,
category: notification["category"]!,
);
},
),
),
],
),
), ),
); );
} }

View File

@ -25,16 +25,13 @@ class AppFeatures extends StatelessWidget {
dividerColor: Colors.grey[300], dividerColor: Colors.grey[300],
appbarColor: Colors.white, appbarColor: Colors.white,
mycenterTitle: true, mycenterTitle: true,
title: Padding( title: Text(
padding: EdgeInsets.only(bottom: 8.0), 'Key Features',
child: Text( style: TextStyle(
'Key Features', fontSize: 22,
style: TextStyle( color: Color(0xFF7DAFBC),
fontSize: 22, fontWeight: FontWeight.w500,
color: Color(0xFF7DAFBC), // fontWeight: FontWeight.w500,
fontWeight: FontWeight.w500,
// fontWeight: FontWeight.w500,
),
), ),
), ),
body: Container( body: Container(

View File

@ -25,16 +25,13 @@ class WhoUseTheApp extends StatelessWidget {
appbarColor: Colors.white, appbarColor: Colors.white,
bottomColor: Colors.white, bottomColor: Colors.white,
mycenterTitle: true, mycenterTitle: true,
title: Padding( title: Text(
padding: EdgeInsets.only(bottom: 8.0), 'Key Features',
child: Text( style: TextStyle(
'Key Features', fontSize: 22,
style: TextStyle( color: Color(0xFF7DAFBC),
fontSize: 22, fontWeight: FontWeight.w500,
color: Color(0xFF7DAFBC), // fontWeight: FontWeight.w500,
fontWeight: FontWeight.w500,
// fontWeight: FontWeight.w500,
),
), ),
), ),
body: Container( body: Container(

View File

@ -1,4 +1,5 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:uae_stat/infrastructure/services/img_asset_paths/banner_asset_path.dart';
import 'package:uae_stat/presentation/routes/drawer_routes/custom_drawer_routes.dart'; import 'package:uae_stat/presentation/routes/drawer_routes/custom_drawer_routes.dart';
@ -10,6 +11,11 @@ class FAQPage extends StatefulWidget {
} }
class _FAQPageState extends State<FAQPage> { class _FAQPageState extends State<FAQPage> {
final fcscBanner = Image.asset(
BannerAssetPath.fcsc,
height: 56,
alignment: Alignment.center,
);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BaseScaffold( return BaseScaffold(
@ -36,7 +42,14 @@ class _FAQPageState extends State<FAQPage> {
radius: Radius.circular(10), radius: Radius.circular(10),
interactive: true, interactive: true,
child: SingleChildScrollView( child: SingleChildScrollView(
child: QuestionAnswerScrollView(), child: Column(
children: [
QuestionAnswerScrollView(),
SizedBox(height: 25,),
fcscBanner,
SizedBox(height: 25,),
],
),
), ),
), ),
), ),

View File

@ -45,15 +45,18 @@ class _UserguideState extends State<Userguide> {
} }
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BaseScaffold( return PopScope(
canPop: false,
onPopInvokedWithResult: (didPop, result) {
if (didPop) return;
context.go('/myhomepage');
},
child: BaseScaffold(
showDivider: true, showDivider: true,
bottomColor: Colors.white, bottomColor: Colors.white,
dividerColor: Colors.grey[300], dividerColor: Colors.grey[300],
appbarColor: Colors.white, appbarColor: Colors.white,
title: Padding( title: Text('User Guide') ,
padding:EdgeInsets.only(bottom:0.0),
child: Text('User Guide'),
) ,
body: Container( body: Container(
color: Colors.white, color: Colors.white,
padding: const EdgeInsets.symmetric(horizontal: 16 , vertical: 20), padding: const EdgeInsets.symmetric(horizontal: 16 , vertical: 20),
@ -74,6 +77,7 @@ class _UserguideState extends State<Userguide> {
}, },
), ),
), ),
),
); );
} }

View File

@ -655,7 +655,7 @@ class _BaseScaffoldState extends ConsumerState<BaseScaffold> {
), ),
), ),
), ),
scrolledUnderElevation: 0,
titleSpacing: 0, titleSpacing: 0,
backgroundColor: widget.appbarColor ?? Colors.white, backgroundColor: widget.appbarColor ?? Colors.white,
leadingWidth: widget.showBackButton ? mywidth * 0.25 : null, leadingWidth: widget.showBackButton ? mywidth * 0.25 : null,

View File

@ -114,7 +114,7 @@ flutter:
- assets/splash_screen/ - assets/splash_screen/
- assets/icons/uae_numbers/bookmarks.png - assets/icons/uae_numbers/bookmarks.png
- assets/icons/uae_numbers/bookmarksSelectedUae.png - assets/icons/uae_numbers/bookmarksSelectedUae.png
- assets/icons/uae_numbers/filters.png - assets/icons/uae_numbers/
- assets/icons/uae_numbers/share.png - assets/icons/uae_numbers/share.png
- assets/icons/misc/vector.png - assets/icons/misc/vector.png
- assets/icons/misc/visible_on.png - assets/icons/misc/visible_on.png