bug fix appbar
This commit is contained in:
parent
93936aeb46
commit
97e981d773
@ -1191,7 +1191,7 @@ class _RegisterScreenState extends ConsumerState<RegisterScreen> {
|
||||
width: screenwidth / 1,
|
||||
child: ElevatedButton(
|
||||
onPressed: () {
|
||||
context.go('/');
|
||||
context.pop();
|
||||
},
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: Color(
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
import 'dart:convert';
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:external_repos/external_repos.dart';
|
||||
import 'package:flutter/gestures.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
@ -10,6 +11,7 @@ import 'package:image_picker/image_picker.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
import 'package:uae_stat/config/my_theme.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/services/img_asset_paths/icons/misc_icon_asset_path.dart';
|
||||
@ -643,6 +645,15 @@ class _ProfileScreenState extends State<ProfileScreen> {
|
||||
controller: _fullNameController,
|
||||
focusNode: _focusNodes[2],
|
||||
decoration: InputDecoration(
|
||||
enabledBorder:OutlineInputBorder(
|
||||
borderRadius:
|
||||
BorderRadius.circular(10),
|
||||
borderSide: BorderSide(
|
||||
color: MyTheme.topicColor(
|
||||
IndicatorTopic.economy)
|
||||
.shade400,
|
||||
width: 1), // Enabled border
|
||||
),
|
||||
hintText: _showHints[2] ? 'Enter the name' : null,
|
||||
hintStyle: TextStyle(color: Colors.grey),
|
||||
border: OutlineInputBorder(
|
||||
@ -674,6 +685,15 @@ class _ProfileScreenState extends State<ProfileScreen> {
|
||||
controller: _dateController,
|
||||
focusNode: _focusNodes[3],
|
||||
decoration: InputDecoration(
|
||||
enabledBorder:OutlineInputBorder(
|
||||
borderRadius:
|
||||
BorderRadius.circular(10),
|
||||
borderSide: BorderSide(
|
||||
color: MyTheme.topicColor(
|
||||
IndicatorTopic.economy)
|
||||
.shade400,
|
||||
width: 1), // Enabled border
|
||||
),
|
||||
border: OutlineInputBorder(
|
||||
borderSide:BorderSide(color: Color(0xFF7296BE),
|
||||
),
|
||||
@ -717,6 +737,15 @@ class _ProfileScreenState extends State<ProfileScreen> {
|
||||
child: DropdownButtonFormField<String>(
|
||||
value: _selectedCountry,
|
||||
decoration: InputDecoration(
|
||||
enabledBorder:OutlineInputBorder(
|
||||
borderRadius:
|
||||
BorderRadius.circular(10),
|
||||
borderSide: BorderSide(
|
||||
color: MyTheme.topicColor(
|
||||
IndicatorTopic.economy)
|
||||
.shade400,
|
||||
width: 1), // Enabled border
|
||||
),
|
||||
border: OutlineInputBorder(
|
||||
borderSide:BorderSide(color: Color(0xFF7296BE),
|
||||
),
|
||||
|
||||
@ -547,7 +547,7 @@ class LoginRoute extends HookConsumerWidget {
|
||||
],
|
||||
);
|
||||
final dontHaveAnAccountRegisterBtn = TextButton(
|
||||
onPressed: () => {context.go('/register')},
|
||||
onPressed: () => {context.push('/register')},
|
||||
child: Text.rich(
|
||||
textAlign: TextAlign.center,
|
||||
TextSpan(
|
||||
|
||||
@ -1028,7 +1028,7 @@ class EconomyStatsState extends ConsumerState<EconomyStatsWidget> {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
RoundedCornerContainer(
|
||||
key: mainTopic['main_topic'] == 'ECONOMY'
|
||||
key: mainTopic['main_topic'] == 'ECONOMY' || mainTopic['main_topic'] == 'اقتصاد'
|
||||
? cardTopicKey
|
||||
: null,
|
||||
text: mainTopic['main_topic'],
|
||||
@ -1042,7 +1042,7 @@ class EconomyStatsState extends ConsumerState<EconomyStatsWidget> {
|
||||
SizedBox(
|
||||
height: myheight / 4.8, // Set dynamic height
|
||||
child: Container(
|
||||
key: mainTopic['main_topic'] == 'ECONOMY'
|
||||
key: mainTopic['main_topic'] == 'ECONOMY' || mainTopic['main_topic'] == 'اقتصاد'
|
||||
? cardsKey
|
||||
: null,
|
||||
// color: Colors.grey[200], // Set a background color for the scrollable container
|
||||
|
||||
@ -712,10 +712,10 @@ class _EditProfileState extends State<EditProfile> {
|
||||
// counterText: '',
|
||||
enabled: !_isProfileCompleted,
|
||||
),
|
||||
maxLength:
|
||||
40, // Set the maximum length to 20 characters
|
||||
maxLengthEnforcement:
|
||||
MaxLengthEnforcement.enforced,
|
||||
// maxLength:
|
||||
// 40, // Set the maximum length to 20 characters
|
||||
// maxLengthEnforcement:
|
||||
// MaxLengthEnforcement.enforced,
|
||||
),
|
||||
SizedBox(height: 10),
|
||||
Row(
|
||||
@ -777,8 +777,23 @@ class _EditProfileState extends State<EditProfile> {
|
||||
onExit: (_) => setState(
|
||||
() => _isHoveringDropdown = false),
|
||||
child: DropdownButtonFormField<String>(
|
||||
style: TextStyle(
|
||||
fontFamily: 'Roboto',
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.normal,
|
||||
color: Color(0xFF544C4C),
|
||||
),
|
||||
value: _selectedCountry,
|
||||
decoration: InputDecoration(
|
||||
enabledBorder:OutlineInputBorder(
|
||||
borderRadius:
|
||||
BorderRadius.circular(10),
|
||||
borderSide: BorderSide(
|
||||
color: MyTheme.topicColor(
|
||||
IndicatorTopic.economy)
|
||||
.shade400,
|
||||
width: 1), // Enabled border
|
||||
),
|
||||
border: OutlineInputBorder(
|
||||
borderSide:BorderSide(color: Color(0xFF7296BE),
|
||||
),
|
||||
@ -937,7 +952,6 @@ class _EditProfileState extends State<EditProfile> {
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 20),
|
||||
Center(
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import 'dart:async';
|
||||
import 'dart:convert';
|
||||
import 'dart:math';
|
||||
|
||||
import 'package:iconify_design/iconify_design.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
@ -686,45 +686,50 @@ class _BaseScaffoldState extends ConsumerState<BaseScaffold> {
|
||||
},
|
||||
),
|
||||
],
|
||||
leading: Stack(
|
||||
children: [
|
||||
if (widget.showBackButton == true)
|
||||
Align(
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Padding(
|
||||
padding: EdgeInsets.only(left: 8),
|
||||
|
||||
child: IconButton(
|
||||
color: Colors.white,
|
||||
icon: const Icon(Icons.arrow_back_ios_new, size: 26),
|
||||
onPressed: () {
|
||||
if ((widget.navBackArrow as Text).data == 'home') {
|
||||
context.go('/myhomepage');
|
||||
} else {
|
||||
context.go('/uaenumbers');
|
||||
}
|
||||
},
|
||||
),
|
||||
),),
|
||||
|
||||
Align(
|
||||
alignment: Alignment.centerRight,
|
||||
child: Padding(
|
||||
padding: EdgeInsets.only(right: 10),
|
||||
child: Builder(
|
||||
builder: (BuildContext context) {
|
||||
return IconButton(
|
||||
key: drawerKey,
|
||||
color: widget.colorChange ? Colors.white : Colors.black,
|
||||
icon: const Icon(Icons.menu, size: 30),
|
||||
leading: Padding(
|
||||
padding: const EdgeInsets.only(top: 7.0,left: 4),
|
||||
child: Row(
|
||||
mainAxisSize:MainAxisSize.min,
|
||||
children: [
|
||||
if (widget.showBackButton == true)
|
||||
SizedBox(
|
||||
width: 25,
|
||||
height: 25,
|
||||
child: IconButton(
|
||||
padding: EdgeInsets.zero,
|
||||
constraints: BoxConstraints(),
|
||||
color: Colors.white,
|
||||
icon: const Icon(Icons.arrow_back_ios_new, size: 24),
|
||||
onPressed: () {
|
||||
Scaffold.of(context).openDrawer();
|
||||
if ((widget.navBackArrow as Text).data == 'home') {
|
||||
context.go('/myhomepage');
|
||||
} else {
|
||||
context.go('/uaenumbers');
|
||||
}
|
||||
},
|
||||
),
|
||||
),
|
||||
SizedBox(width: 7,),
|
||||
Builder(
|
||||
builder: (BuildContext context) {
|
||||
return SizedBox(
|
||||
width: 30,
|
||||
height: 30,
|
||||
child: IconButton(
|
||||
padding: EdgeInsets.zero,
|
||||
constraints: BoxConstraints(),
|
||||
key: drawerKey,
|
||||
color: widget.colorChange ? Colors.white : Colors.black,
|
||||
icon: const Icon(Icons.menu, size: 30),
|
||||
onPressed: () {
|
||||
Scaffold.of(context).openDrawer();
|
||||
},
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
),),
|
||||
],
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
|
||||
@ -737,6 +742,7 @@ class _BaseScaffoldState extends ConsumerState<BaseScaffold> {
|
||||
children: [
|
||||
DrawerHeader(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
Row(
|
||||
@ -810,24 +816,26 @@ class _BaseScaffoldState extends ConsumerState<BaseScaffold> {
|
||||
onTap: () => context.go('/notification'),
|
||||
),
|
||||
ListTile(
|
||||
leading: Image.asset(
|
||||
DrawerAssetIconPath.feedback,
|
||||
color: Colors.black,
|
||||
width: 20,
|
||||
height: 20,
|
||||
),
|
||||
leading: Icon(Icons.message_outlined),
|
||||
// leading: Image.asset(
|
||||
// DrawerAssetIconPath.feedback,
|
||||
// color: Colors.black,
|
||||
// width: 20,
|
||||
// height: 20,
|
||||
// ),
|
||||
// title: const Text('Feedback'),
|
||||
title: Text(AppLocalizations.of(context)!.feedback_title),
|
||||
onTap: () => context.go('/feedback', extra: userName),
|
||||
),
|
||||
if (role == 'admin')
|
||||
ListTile(
|
||||
leading: Image.asset(
|
||||
DrawerAssetIconPath.manageUser,
|
||||
color: Colors.black,
|
||||
width: 20,
|
||||
height: 20,
|
||||
),
|
||||
leading: Icon(Icons.manage_accounts_outlined),
|
||||
// leading: Image.asset(
|
||||
// DrawerAssetIconPath.manageUser,
|
||||
// color: Colors.black,
|
||||
// width: 20,
|
||||
// height: 20,
|
||||
// ),
|
||||
// title: Text('Manage User'),
|
||||
title: Text(
|
||||
AppLocalizations.of(context)!.manage_user,
|
||||
@ -843,12 +851,13 @@ class _BaseScaffoldState extends ConsumerState<BaseScaffold> {
|
||||
onTap: () => context.go('/bookmark'),
|
||||
),
|
||||
ListTile(
|
||||
leading: Image.asset(
|
||||
DrawerAssetIconPath.guide,
|
||||
color: Colors.black,
|
||||
width: 20,
|
||||
height: 20,
|
||||
),
|
||||
leading: Icon(Icons.menu_book_outlined),
|
||||
// leading: Image.asset(
|
||||
// DrawerAssetIconPath.guide,
|
||||
// color: Colors.black,
|
||||
// width: 20,
|
||||
// height: 20,
|
||||
// ),
|
||||
// title: const Text('User Guide'),
|
||||
title: Text(AppLocalizations.of(context)!.guide_title),
|
||||
onTap: () => context.go('/user-guide'),
|
||||
|
||||
@ -113,7 +113,9 @@ class ResetPwRoute extends HookConsumerWidget {
|
||||
}
|
||||
},
|
||||
);
|
||||
await Fluttertoast.showToast(msg: 'Password changed successfully');
|
||||
await Fluttertoast.showToast(msg: 'Password changed successfully',
|
||||
gravity: ToastGravity.CENTER,
|
||||
);
|
||||
if (!context.mounted) return;
|
||||
context.pop();
|
||||
},
|
||||
|
||||
Loading…
Reference in New Issue
Block a user