Merge branch 'dev' of github.com:VinistanSS/FCSC into dev

This commit is contained in:
venbaittech 2025-02-14 18:25:27 +05:30
commit f4186a876b
26 changed files with 1118 additions and 1024 deletions

View File

@ -0,0 +1,3 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12.9999 4V8C6.42494 9.028 3.97994 14.788 2.99994 20C2.96294 20.206 8.38394 14.038 12.9999 14V18L20.9999 11L12.9999 4Z" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>

After

Width:  |  Height:  |  Size: 313 B

View File

@ -2,8 +2,9 @@ import 'package:flutter/material.dart';
abstract class UaeNumbersAssetPath { abstract class UaeNumbersAssetPath {
static const _basePath = 'assets/icons/uae_numbers'; static const _basePath = 'assets/icons/uae_numbers';
static const bookmarksUae = '$_basePath/bookmarks.png'; // static const bookmarksUae = '$_basePath/bookmarks.png';
static const bookmarksSelectedUae = '$_basePath/bookmarksSelectedUae.png'; // static const bookmarksSelectedUae = '$_basePath/bookmarksSelectedUae.png';
static const shareUae = '$_basePath/share.png'; // static const shareUae = '$_basePath/share.png';
static const share = '$_basePath/share.svg';
static const filterUae = '$_basePath/filters.png'; static const filterUae = '$_basePath/filters.png';
} }

View File

@ -288,7 +288,7 @@ class _UaenumberWidgetState extends ConsumerState<uaenumberWidget> {
final encodedTitle = Uri.encodeComponent(title); final encodedTitle = Uri.encodeComponent(title);
// Pass mainTopic and title as query parameters // Pass mainTopic and title as query parameters
context.go( context.push(
'/chartScreen/$data_set?bgColor=$colorPattern&mainTopic=$encodedMainTopic&title=$encodedTitle'); '/chartScreen/$data_set?bgColor=$colorPattern&mainTopic=$encodedMainTopic&title=$encodedTitle');
// context.go('/chartScreen/$data_set'); // context.go('/chartScreen/$data_set');
}, },

View File

@ -14,7 +14,7 @@ import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import '../../../config/my_theme.dart'; import '../../../config/my_theme.dart';
class CreateNewPw extends StatefulWidget { class CreateNewPw extends ConsumerStatefulWidget {
final String userId; final String userId;
final String email; final String email;
final String? keyParam; final String? keyParam;
@ -22,10 +22,10 @@ class CreateNewPw extends StatefulWidget {
const CreateNewPw({Key? key, required this.userId, required this.email, required this.keyParam}); const CreateNewPw({Key? key, required this.userId, required this.email, required this.keyParam});
@override @override
State<CreateNewPw> createState() => _CreateNewPwState(); ConsumerState<CreateNewPw> createState() => _CreateNewPwState();
} }
class _CreateNewPwState extends State<CreateNewPw> { class _CreateNewPwState extends ConsumerState<CreateNewPw> {
final _pb = PocketBase('https://pb.venbait.in'); final _pb = PocketBase('https://pb.venbait.in');
final _formKey = GlobalKey<FormState>(); final _formKey = GlobalKey<FormState>();
bool _obscureOldPassword = true; bool _obscureOldPassword = true;
@ -191,6 +191,7 @@ class _CreateNewPwState extends State<CreateNewPw> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
double screenHeight = MediaQuery.of(context).size.height; double screenHeight = MediaQuery.of(context).size.height;
double screenWidth = MediaQuery.of(context).size.width; double screenWidth = MediaQuery.of(context).size.width;
final passwordLocale = ref.watch(localeProvider);
return Scaffold( return Scaffold(
backgroundColor: Colors.white, backgroundColor: Colors.white,
@ -198,13 +199,14 @@ class _CreateNewPwState extends State<CreateNewPw> {
child: SafeArea( child: SafeArea(
child: _isPasswordUpdated child: _isPasswordUpdated
? _buildSuccessContent(screenHeight, screenWidth) ? _buildSuccessContent(screenHeight, screenWidth)
: _buildPasswordForm(screenHeight, screenWidth), : _buildPasswordForm(ref,screenHeight, screenWidth),
), ),
), ),
); );
} }
Widget _buildPasswordForm(double screenHeight, double screenWidth) { Widget _buildPasswordForm(WidgetRef ref ,double screenHeight, double screenWidth) {
final passwordLocale = ref.watch(localeProvider);
return Form( return Form(
key: _formKey, key: _formKey,
child: Padding( child: Padding(
@ -231,7 +233,7 @@ class _CreateNewPwState extends State<CreateNewPw> {
child: Icon( child: Icon(
// Icons.close, // Icons.close,
Icons.arrow_back_ios, Icons.arrow_back_ios,
size: 28, // Icon size size: 24, // Icon size
color: Colors.black, // Icon color color: Colors.black, // Icon color
), ),
), ),
@ -259,7 +261,10 @@ class _CreateNewPwState extends State<CreateNewPw> {
// "Create New Password", // "Create New Password",
AppLocalizations.of(context)!.create_new_password, AppLocalizations.of(context)!.create_new_password,
style: TextStyle( style: TextStyle(
fontSize: 26, fontSize: passwordLocale?.languageCode ==
'ar'
? 24
:26,
fontWeight: FontWeight.w300, fontWeight: FontWeight.w300,
), ),
), ),
@ -269,12 +274,18 @@ class _CreateNewPwState extends State<CreateNewPw> {
TextSpan( TextSpan(
children: [ children: [
TextSpan( TextSpan(
text: 'Your New Password Must Be Different\n', text: context.translate('Your New Password Must Be Different\n','يجب أن تكون كلمة المرور الجديدة مختلفة\n',),
style: TextStyle(fontSize: 15,fontWeight: FontWeight.w700, color: Color(0xFF898C81)), style: TextStyle(fontSize: passwordLocale?.languageCode ==
'ar'
? 14
:15,fontWeight: FontWeight.w700, color: Color(0xFF898C81)),
), ),
TextSpan( TextSpan(
text: 'from Previously Used Password', text: context.translate('from Previously Used Password','عن كلمة المرور المستخدمة سابقًا'),
style: TextStyle(fontSize: 15, color: Color(0xFF898C81), fontWeight: FontWeight.w700), style: TextStyle(fontSize: passwordLocale?.languageCode ==
'ar'
? 14
:15, color: Color(0xFF898C81), fontWeight: FontWeight.w700),
), ),
], ],
), ),
@ -590,7 +601,10 @@ class _CreateNewPwState extends State<CreateNewPw> {
children: [ children: [
Text( Text(
AppLocalizations.of(context)!.save, AppLocalizations.of(context)!.save,
style: TextStyle(fontSize: 18, color: Colors.white), style: TextStyle(fontSize: passwordLocale?.languageCode ==
'ar'
? 14
:18, color: Colors.white),
), ),
SizedBox(width: 2), SizedBox(width: 2),
Icon( Icon(

View File

@ -17,6 +17,7 @@ class PrivacyPolicy extends StatelessWidget {
), ),
child: Scaffold( child: Scaffold(
appBar: AppBar( appBar: AppBar(
scrolledUnderElevation: 0,
title:Text(context.translate( title:Text(context.translate(
'Privacy Policy', 'Privacy Policy',
'الشروط والأحكام', 'الشروط والأحكام',

File diff suppressed because it is too large Load Diff

View File

@ -17,6 +17,7 @@ class TermsOfUse extends StatelessWidget {
), ),
child: Scaffold( child: Scaffold(
appBar: AppBar( appBar: AppBar(
scrolledUnderElevation: 0,
title:Text(context.translate( title:Text(context.translate(
'Terms & Conditions', 'Terms & Conditions',
'الشروط والأحكام', 'الشروط والأحكام',

View File

@ -1,6 +1,7 @@
import 'package:flutter/foundation.dart'; import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:flutter_svg/svg.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:shared_preferences/shared_preferences.dart'; import 'package:shared_preferences/shared_preferences.dart';
@ -2071,16 +2072,17 @@ class _ChartScreen1State extends ConsumerState<ChartScreen1> {
// color: Colors.white), // color: Colors.white),
// ), // ),
// const SizedBox(width: 5), // const SizedBox(width: 5),
Image.asset( // Image.asset(
isBookmarked // isBookmarked
? UaeNumbersAssetPath // ? UaeNumbersAssetPath
.bookmarksSelectedUae // Filled bookmark image // .bookmarksSelectedUae // Filled bookmark image
: UaeNumbersAssetPath // : UaeNumbersAssetPath
.bookmarksUae, // Default bookmark image // .bookmarksUae, // Default bookmark image
// color: Colors.white, // // color: Colors.white,
width: 24, // width: 24,
height: 24, // height: 24,
), // ),
Icon(Icons.bookmarks_rounded, color:isBookmarked ? Colors.black:Colors.white ,),
], ],
), ),
), ),
@ -2102,18 +2104,24 @@ class _ChartScreen1State extends ConsumerState<ChartScreen1> {
SizedBox(width: 5), SizedBox(width: 5),
Stack( Stack(
children: [ children: [
Image.asset( // Image.asset(
UaeNumbersAssetPath.shareUae, // UaeNumbersAssetPath.shareUae,
color: Colors.white, // Outline color // color: Colors.white, // Outline color
width: 24, // Slightly larger // width: 24, // Slightly larger
height: 24, // height: 24,
), // ),
Image.asset( // Image.asset(
UaeNumbersAssetPath.shareUae, // UaeNumbersAssetPath.shareUae,
color: Colors.white, // color: Colors.white,
// width: 24,
// height: 24,
// ),
SvgPicture.asset(
UaeNumbersAssetPath.share,
semanticsLabel: 'share',
width: 24, width: 24,
height: 24, height: 24,
), ),
], ],
) )
], ],

View File

@ -5,6 +5,7 @@ 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';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:go_router/go_router.dart'; import 'package:go_router/go_router.dart';
import 'package:http/http.dart' as http; import 'package:http/http.dart' as http;
import 'package:image_picker/image_picker.dart'; import 'package:image_picker/image_picker.dart';
@ -15,6 +16,8 @@ import 'package:uae_stat/config/my_theme.dart';
import 'package:uae_stat/domain/use_cases/language.dart'; import 'package:uae_stat/domain/use_cases/language.dart';
import 'package:uae_stat/infrastructure/data/p_auth_repo.dart'; import 'package:uae_stat/infrastructure/data/p_auth_repo.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/components/indicators/locale_provider.dart';
import 'package:uae_stat/presentation/components/my_toggle.dart';
import 'package:uae_stat/presentation/routes/bottom_bar_routes/tab_routes/home_route.dart'; import 'package:uae_stat/presentation/routes/bottom_bar_routes/tab_routes/home_route.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart';
@ -22,15 +25,15 @@ import '../components/my_bottom_nav_bar.dart';
import 'auth_verification/changepassword.dart'; import 'auth_verification/changepassword.dart';
import 'demo_home.dart'; import 'demo_home.dart';
class ProfileScreen extends StatefulWidget { class ProfileScreen extends ConsumerStatefulWidget {
final String userId; // Add this field to hold the user ID final String userId; // Add this field to hold the user ID
const ProfileScreen({Key? key, required this.userId}) : super(key: key); const ProfileScreen({Key? key, required this.userId}) : super(key: key);
@override @override
State<ProfileScreen> createState() => _ProfileScreenState(); ConsumerState<ProfileScreen> createState() => _ProfileScreenState();
} }
class _ProfileScreenState extends State<ProfileScreen> { class _ProfileScreenState extends ConsumerState<ProfileScreen> {
final _pb = PocketBase('https://pb.venbait.in'); final _pb = PocketBase('https://pb.venbait.in');
// final _pb = PocketBase('http://127.0.0.1:8090'); // final _pb = PocketBase('http://127.0.0.1:8090');
@ -183,10 +186,10 @@ class _ProfileScreenState extends State<ProfileScreen> {
_isLoading = true; // Start loading _isLoading = true; // Start loading
}); });
final XFile? pickedFile = final XFile? pickedFile =
await _picker.pickImage(source: ImageSource.gallery); await _picker.pickImage(source: ImageSource.gallery);
if (pickedFile != null) { if (pickedFile != null) {
final String fileExtension = final String fileExtension =
pickedFile.path.split('.').last.toLowerCase(); pickedFile.path.split('.').last.toLowerCase();
if (fileExtension == 'jpg' || if (fileExtension == 'jpg' ||
fileExtension == 'jpeg' || fileExtension == 'jpeg' ||
fileExtension == 'png' || fileExtension == 'png' ||
@ -320,7 +323,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
// Create a multipart request // Create a multipart request
final uri = final uri =
Uri.parse('${_pb.baseUrl}/api/collections/users/records/$userID'); Uri.parse('${_pb.baseUrl}/api/collections/users/records/$userID');
final request = http.MultipartRequest('PATCH', uri); final request = http.MultipartRequest('PATCH', uri);
// Add other fields // Add other fields
@ -461,6 +464,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
}, },
child: Scaffold( child: Scaffold(
appBar: AppBar( appBar: AppBar(
scrolledUnderElevation: 0,
backgroundColor: Colors.white, backgroundColor: Colors.white,
elevation: 0, elevation: 0,
leading: IconButton( leading: IconButton(
@ -473,6 +477,23 @@ class _ProfileScreenState extends State<ProfileScreen> {
AppLocalizations.of(context)!.my_profile, AppLocalizations.of(context)!.my_profile,
style: TextStyle(color: Color(0xFF985400)), style: TextStyle(color: Color(0xFF985400)),
), ),
actions: [
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();
},
);
},
),
],
// actions: [ // actions: [
// TextButton( // TextButton(
// onPressed: () { // onPressed: () {
@ -531,7 +552,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
backgroundImage: _profileImage != null backgroundImage: _profileImage != null
? FileImage(_profileImage!) ? FileImage(_profileImage!)
: AssetImage("assets/edit_profile/profile.png") : AssetImage("assets/edit_profile/profile.png")
as ImageProvider, as ImageProvider,
child: Align( child: Align(
alignment: Alignment.bottomRight, alignment: Alignment.bottomRight,
child: GestureDetector( child: GestureDetector(
@ -555,7 +576,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
child: CircularProgressIndicator( child: CircularProgressIndicator(
strokeWidth: 2, strokeWidth: 2,
valueColor: valueColor:
AlwaysStoppedAnimation<Color>(Colors.grey), AlwaysStoppedAnimation<Color>(Colors.grey),
), ),
), ),
], ],
@ -707,7 +728,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
width: 45, width: 45,
padding: EdgeInsets.only(right: 1), padding: EdgeInsets.only(right: 1),
alignment: alignment:
Alignment.center, // Center the icon vertically Alignment.center, // Center the icon vertically
child: Icon( child: Icon(
Icons.keyboard_arrow_down_sharp, Icons.keyboard_arrow_down_sharp,
color: _isHoveringDate ? Colors.black : Colors.grey, color: _isHoveringDate ? Colors.black : Colors.grey,
@ -755,12 +776,12 @@ class _ProfileScreenState extends State<ProfileScreen> {
), ),
icon: Icon(Icons.keyboard_arrow_down_sharp, icon: Icon(Icons.keyboard_arrow_down_sharp,
color: color:
_isHoveringDropdown ? Colors.black : Colors.grey), _isHoveringDropdown ? Colors.black : Colors.grey),
items: _countries items: _countries
.map((item) => DropdownMenuItem<String>( .map((item) => DropdownMenuItem<String>(
value: item, value: item,
child: Text(item), child: Text(item),
)) ))
.toList(), .toList(),
onChanged: (String? newValue) { onChanged: (String? newValue) {
setState(() { setState(() {
@ -783,79 +804,91 @@ class _ProfileScreenState extends State<ProfileScreen> {
}, },
side: BorderSide( side: BorderSide(
color: color:
showError ? Color(0xFFb22222) : Color(0xFF7296BE), showError ? Color(0xFFb22222) : Color(0xFF7296BE),
width: 1, width: 1,
), ),
), ),
Expanded( Expanded(
child: Column( child: Padding(
mainAxisAlignment: MainAxisAlignment.start, padding: const EdgeInsets.only(
crossAxisAlignment: CrossAxisAlignment.start, top: 14.0,),
children: [ child: Text.rich(
SizedBox( TextSpan(
height: 10, text: AppLocalizations.of(
), context)!
Text.rich( .agree,
TextSpan( // text: 'I agree to ',
text: AppLocalizations.of(context)!.agree, style: TextStyle(
style: TextStyle(color: Color(0xFF898C81)), fontWeight: FontWeight.w500,
children: [ fontSize: 14,
TextSpan( color: Color(
recognizer:TapGestureRecognizer() 0xFF898C81,), // Change to your desired color
..onTap = () => context.push('/terms&conditions'),
text: AppLocalizations.of(
context,
)!
.terms_conditions,
style: TextStyle(
color: Color(0xFF985400),
// decoration: TextDecoration.underline,
fontWeight: FontWeight
.w600, // Makes the text bold
decorationColor: Color(0xFF985400),
decorationThickness: 1,
),
),
TextSpan(
text: AppLocalizations.of(
context,
)!
.t_and,
style: TextStyle(color: Color(0xFF898C81)),
),
TextSpan(
recognizer: TapGestureRecognizer()
..onTap = () => context.push('/privacy_policy'),
text: AppLocalizations.of(
context,
)!
.privacy_policy,
style: TextStyle(
color: Color(0xFF985400),
// decoration: TextDecoration.underline,
fontWeight: FontWeight
.w600, // Makes the text bold
decorationColor: Color(0xFF985400),
decorationThickness: 1,
),
),
TextSpan(
text: AppLocalizations.of(
context,
)!
.conditions,
style: TextStyle(color: Color(0xFF898C81)),
),
],
), ),
textAlign: TextAlign.start, children: [
maxLines: 2, TextSpan(
overflow: TextOverflow.visible, recognizer:TapGestureRecognizer()
softWrap: true, ..onTap = () => context.push('/terms&conditions'),
text: AppLocalizations.of(
context)!
.terms_conditions,
// text: 'Terms & Conditions',
style: TextStyle(
fontSize: 14,
fontWeight:
FontWeight.bold,
color:
Color(0xFF985400),
// Makes the text bold
// decoration:
// TextDecoration.underline,
decorationColor:
Color(0xFF985400),
decorationThickness:
1),
),
TextSpan(
text: AppLocalizations.of(
context)!
.t_and,
style: TextStyle(
color: Color(
0xFF898C81), // Change to your desired color
),
),
TextSpan(
recognizer: TapGestureRecognizer()
..onTap = () => context.push('/privacy_policy'),
text: AppLocalizations.of(
context)!
.privacy_policy,
style: TextStyle(
fontWeight:
FontWeight.bold,
fontSize: 14,
fontFamily: 'Roboto',
color:
Color(0xFF985400),
// decoration:
// TextDecoration.underline,
decorationColor:
Color(0xFF648CBA),
decorationThickness:
1),
),
TextSpan(
text: AppLocalizations.of(
context)!
.conditions,
style: TextStyle(
fontWeight: FontWeight.w500,
fontSize: 14,
color: Color(
0xFF898C81), // Change to your desired color
),
),
],
), ),
], ),
), ),
), ),
], ],
@ -909,7 +942,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
} else { } else {
setState(() { setState(() {
showError = showError =
!isChecked; // Show error if the checkbox is not checked !isChecked; // Show error if the checkbox is not checked
}); });
} }
}, },
@ -922,7 +955,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
), ),
child: Row( child: Row(
mainAxisAlignment: mainAxisAlignment:
MainAxisAlignment.center, // Center the content MainAxisAlignment.center, // Center the content
children: [ children: [
Text( Text(
AppLocalizations.of(context)!.save, AppLocalizations.of(context)!.save,
@ -981,7 +1014,7 @@ class ConfirmationDialog extends StatelessWidget {
TextSpan( TextSpan(
text: "Name", text: "Name",
style: style:
TextStyle(fontWeight: FontWeight.w700), // Bold for "name" TextStyle(fontWeight: FontWeight.w700), // Bold for "name"
), ),
TextSpan( TextSpan(
text: " or ", text: " or ",

View File

@ -449,8 +449,8 @@ class LoginRoute extends HookConsumerWidget {
'Roboto', 'Roboto',
'Roboto', 'Roboto',
), ),
fontSize: locale?.languageCode == 'ar' ? 14: 18, fontSize: locale?.languageCode == 'ar' ? 12: 18,
fontWeight: FontWeight.bold, fontWeight: FontWeight.w500,
) )
), ),
6.horizontalSpace, 6.horizontalSpace,

View File

@ -1266,7 +1266,7 @@ class InfoCard extends StatelessWidget {
return GestureDetector( return GestureDetector(
onTap: () { onTap: () {
context.go( context.push(
'/chartScreen/$dataset?bgColor=$colorPattern&mainTopic=$encodedMainTopic&title=$encodedTitle&key=$encodedKey'); '/chartScreen/$dataset?bgColor=$colorPattern&mainTopic=$encodedMainTopic&title=$encodedTitle&key=$encodedKey');
}, },
child: Container( child: Container(

View File

@ -16,6 +16,7 @@ class aboutFCSC extends StatelessWidget {
); );
return BaseScaffold( return BaseScaffold(
showDivider: true, showDivider: true,
showBackButton: true,
dividerColor: Colors.grey[300], dividerColor: Colors.grey[300],
appbarColor: Colors.white, appbarColor: Colors.white,
bottomColor: Colors.white, bottomColor: Colors.white,

View File

@ -23,6 +23,7 @@ class GetStarted extends StatelessWidget {
), ),
child: BaseScaffold( child: BaseScaffold(
showDivider: true, showDivider: true,
showBackButton: true,
dividerColor: Colors.grey[300], dividerColor: Colors.grey[300],
appbarColor: Colors.white, appbarColor: Colors.white,
bottomColor: Colors.white, bottomColor: Colors.white,

View File

@ -21,6 +21,7 @@ class AppFeatures extends StatelessWidget {
), ),
child: BaseScaffold( child: BaseScaffold(
showDivider: true, showDivider: true,
showBackButton: true,
bottomColor: Colors.white, bottomColor: Colors.white,
dividerColor: Colors.grey[300], dividerColor: Colors.grey[300],
appbarColor: Colors.white, appbarColor: Colors.white,

View File

@ -21,6 +21,7 @@ class ChangeMyPassword extends StatelessWidget {
), ),
child: BaseScaffold( child: BaseScaffold(
showDivider: true, showDivider: true,
showBackButton: true,
bottomColor: Colors.white, bottomColor: Colors.white,
dividerColor: Colors.grey[300], dividerColor: Colors.grey[300],
appbarColor: Colors.white, appbarColor: Colors.white,

View File

@ -21,6 +21,7 @@ class EditMyProfile extends StatelessWidget {
), ),
child: BaseScaffold( child: BaseScaffold(
showDivider: true, showDivider: true,
showBackButton: true,
bottomColor: Colors.white, bottomColor: Colors.white,
dividerColor: Colors.grey[300], dividerColor: Colors.grey[300],
appbarColor: Colors.white, appbarColor: Colors.white,

View File

@ -21,6 +21,7 @@ class HowUseTheApp extends StatelessWidget {
), ),
child: BaseScaffold( child: BaseScaffold(
showDivider: true, showDivider: true,
showBackButton: true,
dividerColor: Colors.grey[300], dividerColor: Colors.grey[300],
appbarColor: Colors.white, appbarColor: Colors.white,
bottomColor: Colors.white, bottomColor: Colors.white,

View File

@ -24,6 +24,7 @@ class Purpose extends StatelessWidget {
), ),
child: BaseScaffold( child: BaseScaffold(
showDivider: true, showDivider: true,
showBackButton: true,
dividerColor: Colors.grey[300], dividerColor: Colors.grey[300],
appbarColor: Colors.white, appbarColor: Colors.white,
bottomColor: Colors.white, bottomColor: Colors.white,

View File

@ -24,6 +24,7 @@ class StayUpdate extends StatelessWidget {
), ),
child: BaseScaffold( child: BaseScaffold(
showDivider: true, showDivider: true,
showBackButton: true,
dividerColor: Colors.grey[300], dividerColor: Colors.grey[300],
appbarColor: Colors.white, appbarColor: Colors.white,
bottomColor: Colors.white, bottomColor: Colors.white,

View File

@ -21,6 +21,7 @@ class WhoUseTheApp extends StatelessWidget {
), ),
child: BaseScaffold( child: BaseScaffold(
showDivider: true, showDivider: true,
showBackButton: true,
dividerColor: Colors.grey[300], dividerColor: Colors.grey[300],
appbarColor: Colors.white, appbarColor: Colors.white,
bottomColor: Colors.white, bottomColor: Colors.white,

View File

@ -16,6 +16,7 @@ class aboutTheApp extends StatelessWidget {
); );
return BaseScaffold( return BaseScaffold(
showDivider: true, showDivider: true,
showBackButton: true,
bottomColor: Colors.white, bottomColor: Colors.white,
dividerColor: Colors.grey[300], dividerColor: Colors.grey[300],
appbarColor: Colors.white, appbarColor: Colors.white,

View File

@ -20,6 +20,7 @@ class _FAQPageState extends State<FAQPage> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BaseScaffold( return BaseScaffold(
dividerColor: Colors.grey[300], dividerColor: Colors.grey[300],
showBackButton: true,
appbarColor: Colors.white, appbarColor: Colors.white,
bottomColor: Colors.white, bottomColor: Colors.white,
mycenterTitle: true, mycenterTitle: true,

View File

@ -17,6 +17,7 @@ class UsingFeatures extends StatelessWidget {
); );
return BaseScaffold( return BaseScaffold(
showDivider: true, showDivider: true,
showBackButton: true,
dividerColor: Colors.grey[300], dividerColor: Colors.grey[300],
bottomColor: Colors.white, bottomColor: Colors.white,
appbarColor: Colors.white, appbarColor: Colors.white,

View File

@ -668,6 +668,17 @@ class _BaseScaffoldState extends ConsumerState<BaseScaffold> {
), ),
) )
: null, : null,
// bottom: widget.showDivider
// ? PreferredSize(
// preferredSize: Size.fromHeight(1), // Height of the line
// child: Container(
// color: widget.dividerColor,
// width: double.infinity,// Line color
// height: 1, // Line thickness
// ),
// )
// : null,
actions: widget.actions ?? actions: widget.actions ??
[ [
// IconButton( // IconButton(
@ -698,14 +709,15 @@ class _BaseScaffoldState extends ConsumerState<BaseScaffold> {
child: IconButton( child: IconButton(
padding: EdgeInsets.zero, padding: EdgeInsets.zero,
constraints: BoxConstraints(), constraints: BoxConstraints(),
color: Colors.white, color: widget.colorChange ? Colors.white : Colors.black,
icon: const Icon(Icons.arrow_back_ios_new, size: 24), icon: const Icon(Icons.arrow_back_ios_new, size: 24),
onPressed: () { onPressed: () {
if ((widget.navBackArrow as Text).data == 'home') { // if ((widget.navBackArrow as Text).data == 'home') {
context.go('/myhomepage'); // context.go('/myhomepage');
} else { // } else {
context.go('/uaenumbers'); // context.go('/uaenumbers');
} // }
context.pop();
}, },
), ),
), ),
@ -755,7 +767,7 @@ class _BaseScaffoldState extends ConsumerState<BaseScaffold> {
), ),
], ],
), ),
Divider(), Divider(thickness: 1, color: Colors.grey),
InkWell( InkWell(
onTap: () { onTap: () {
if (userId != 'guest') context.go('/editProfile'); if (userId != 'guest') context.go('/editProfile');
@ -813,7 +825,7 @@ class _BaseScaffoldState extends ConsumerState<BaseScaffold> {
ListTile( ListTile(
leading: Icon(Icons.notifications_none), leading: Icon(Icons.notifications_none),
title: const Text('Notification'), title: const Text('Notification'),
onTap: () => context.go('/notification'), onTap: () => _navigateTo(context, '/notification'),
), ),
ListTile( ListTile(
leading: Icon(Icons.message_outlined), leading: Icon(Icons.message_outlined),
@ -825,7 +837,7 @@ class _BaseScaffoldState extends ConsumerState<BaseScaffold> {
// ), // ),
// title: const Text('Feedback'), // title: const Text('Feedback'),
title: Text(AppLocalizations.of(context)!.feedback_title), title: Text(AppLocalizations.of(context)!.feedback_title),
onTap: () => context.go('/feedback', extra: userName), onTap: () => _navigateTo(context, '/feedback', extra: userName),
), ),
if (role == 'admin') if (role == 'admin')
ListTile( ListTile(
@ -840,7 +852,7 @@ class _BaseScaffoldState extends ConsumerState<BaseScaffold> {
title: Text( title: Text(
AppLocalizations.of(context)!.manage_user, AppLocalizations.of(context)!.manage_user,
), ),
onTap: () => context.go('/manageuser'), onTap: () => _navigateTo(context, '/manageuser'),
), ),
ListTile( ListTile(
leading: Icon(Icons.bookmarks_outlined), leading: Icon(Icons.bookmarks_outlined),
@ -848,7 +860,7 @@ class _BaseScaffoldState extends ConsumerState<BaseScaffold> {
title: Text( title: Text(
AppLocalizations.of(context)!.bookmark_title, AppLocalizations.of(context)!.bookmark_title,
), ),
onTap: () => context.go('/bookmark'), onTap: () => _navigateTo(context, '/bookmark'),
), ),
ListTile( ListTile(
leading: Icon(Icons.menu_book_outlined), leading: Icon(Icons.menu_book_outlined),
@ -860,7 +872,7 @@ class _BaseScaffoldState extends ConsumerState<BaseScaffold> {
// ), // ),
// title: const Text('User Guide'), // title: const Text('User Guide'),
title: Text(AppLocalizations.of(context)!.guide_title), title: Text(AppLocalizations.of(context)!.guide_title),
onTap: () => context.go('/user-guide'), onTap: () => _navigateTo(context, '/user-guide'),
), ),
if (userId != 'guest') if (userId != 'guest')
ListTile( ListTile(
@ -1000,6 +1012,11 @@ class _BaseScaffoldState extends ConsumerState<BaseScaffold> {
body: widget.body, body: widget.body,
); );
} }
//drawer close code
void _navigateTo(BuildContext context, String route, {Object? extra}) {
Navigator.pop(context); // Close the drawer
context.go(route, extra: extra); // Navigate with extra data
}
int _getSelectedIndex(String route) { int _getSelectedIndex(String route) {
switch (route) { switch (route) {

View File

@ -568,7 +568,7 @@ packages:
source: hosted source: hosted
version: "0.7.0" version: "0.7.0"
flutter_svg: flutter_svg:
dependency: transitive dependency: "direct main"
description: description:
name: flutter_svg name: flutter_svg
sha256: c200fd79c918a40c5cd50ea0877fa13f81bdaf6f0a5d3dbcc2a13e3285d6aa1b sha256: c200fd79c918a40c5cd50ea0877fa13f81bdaf6f0a5d3dbcc2a13e3285d6aa1b
@ -1002,7 +1002,7 @@ packages:
source: hosted source: hosted
version: "1.1.0" version: "1.1.0"
path_provider: path_provider:
dependency: transitive dependency: "direct main"
description: description:
name: path_provider name: path_provider
sha256: "50c5dd5b6e1aaf6fb3a78b33f6aa3afca52bf903a8a5298f53101fdaee55bbcd" sha256: "50c5dd5b6e1aaf6fb3a78b33f6aa3afca52bf903a8a5298f53101fdaee55bbcd"

View File

@ -25,6 +25,7 @@ dependencies:
iconify_design: ^1.0.1 iconify_design: ^1.0.1
marquee: ^2.2.3 marquee: ^2.2.3
url_launcher: ^6.3.1 url_launcher: ^6.3.1
path_provider: ^2.1.5
# dynamic_layouts: # dynamic_layouts:
# git: # git:
# url: https://github.com/flutter/packages.git # url: https://github.com/flutter/packages.git
@ -63,6 +64,7 @@ dependencies:
connectivity_plus: ^6.1.2 connectivity_plus: ^6.1.2
tutorial_coach_mark: ^1.2.12 tutorial_coach_mark: ^1.2.12
package_info_plus: ^8.2.0 package_info_plus: ^8.2.0
flutter_svg: ^2.0.17
dependency_overrides: dependency_overrides:
fading_edge_scrollview: ^4.1.1 fading_edge_scrollview: ^4.1.1
@ -136,6 +138,7 @@ flutter:
- assets/icons/misc/group.png - assets/icons/misc/group.png
- assets/icons/misc/search.png - assets/icons/misc/search.png
fonts: fonts:
- family: Segoe - family: Segoe
fonts: fonts: