Merge branch 'dev' of github.com:VinistanSS/FCSC into dev
This commit is contained in:
commit
627cc6a34e
@ -684,14 +684,14 @@ class _CreateNewPwState extends State<CreateNewPw> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
6.horizontalSpace,
|
6.horizontalSpace,
|
||||||
const Icon(Icons.chevron_right_outlined),
|
const Icon(Icons.chevron_right_outlined,color:Colors.white),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(height: screenHeight / 12),
|
SizedBox(height: screenHeight / 2.2),
|
||||||
Center(
|
Center(
|
||||||
child: Container(
|
child: Container(
|
||||||
height: screenHeight / 1,
|
height: 40,
|
||||||
width: screenWidth / 2.5,
|
width: screenWidth / 2.5,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
|
|||||||
@ -1191,7 +1191,7 @@ class _RegisterScreenState extends ConsumerState<RegisterScreen> {
|
|||||||
width: screenwidth / 1,
|
width: screenwidth / 1,
|
||||||
child: ElevatedButton(
|
child: ElevatedButton(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
context.go('/');
|
context.pop();
|
||||||
},
|
},
|
||||||
style: ElevatedButton.styleFrom(
|
style: ElevatedButton.styleFrom(
|
||||||
backgroundColor: Color(
|
backgroundColor: Color(
|
||||||
|
|||||||
@ -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';
|
||||||
@ -10,6 +11,7 @@ import 'package:image_picker/image_picker.dart';
|
|||||||
import 'package:intl/intl.dart';
|
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: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';
|
||||||
@ -643,6 +645,15 @@ class _ProfileScreenState extends State<ProfileScreen> {
|
|||||||
controller: _fullNameController,
|
controller: _fullNameController,
|
||||||
focusNode: _focusNodes[2],
|
focusNode: _focusNodes[2],
|
||||||
decoration: InputDecoration(
|
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,
|
hintText: _showHints[2] ? 'Enter the name' : null,
|
||||||
hintStyle: TextStyle(color: Colors.grey),
|
hintStyle: TextStyle(color: Colors.grey),
|
||||||
border: OutlineInputBorder(
|
border: OutlineInputBorder(
|
||||||
@ -674,6 +685,15 @@ class _ProfileScreenState extends State<ProfileScreen> {
|
|||||||
controller: _dateController,
|
controller: _dateController,
|
||||||
focusNode: _focusNodes[3],
|
focusNode: _focusNodes[3],
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
|
enabledBorder:OutlineInputBorder(
|
||||||
|
borderRadius:
|
||||||
|
BorderRadius.circular(10),
|
||||||
|
borderSide: BorderSide(
|
||||||
|
color: MyTheme.topicColor(
|
||||||
|
IndicatorTopic.economy)
|
||||||
|
.shade400,
|
||||||
|
width: 1), // Enabled border
|
||||||
|
),
|
||||||
border: OutlineInputBorder(
|
border: OutlineInputBorder(
|
||||||
borderSide:BorderSide(color: Color(0xFF7296BE),
|
borderSide:BorderSide(color: Color(0xFF7296BE),
|
||||||
),
|
),
|
||||||
@ -717,6 +737,15 @@ class _ProfileScreenState extends State<ProfileScreen> {
|
|||||||
child: DropdownButtonFormField<String>(
|
child: DropdownButtonFormField<String>(
|
||||||
value: _selectedCountry,
|
value: _selectedCountry,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
|
enabledBorder:OutlineInputBorder(
|
||||||
|
borderRadius:
|
||||||
|
BorderRadius.circular(10),
|
||||||
|
borderSide: BorderSide(
|
||||||
|
color: MyTheme.topicColor(
|
||||||
|
IndicatorTopic.economy)
|
||||||
|
.shade400,
|
||||||
|
width: 1), // Enabled border
|
||||||
|
),
|
||||||
border: OutlineInputBorder(
|
border: OutlineInputBorder(
|
||||||
borderSide:BorderSide(color: Color(0xFF7296BE),
|
borderSide:BorderSide(color: Color(0xFF7296BE),
|
||||||
),
|
),
|
||||||
|
|||||||
@ -547,7 +547,7 @@ class LoginRoute extends HookConsumerWidget {
|
|||||||
],
|
],
|
||||||
);
|
);
|
||||||
final dontHaveAnAccountRegisterBtn = TextButton(
|
final dontHaveAnAccountRegisterBtn = TextButton(
|
||||||
onPressed: () => {context.go('/register')},
|
onPressed: () => {context.push('/register')},
|
||||||
child: Text.rich(
|
child: Text.rich(
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
TextSpan(
|
TextSpan(
|
||||||
|
|||||||
@ -1028,7 +1028,7 @@ class EconomyStatsState extends ConsumerState<EconomyStatsWidget> {
|
|||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
RoundedCornerContainer(
|
RoundedCornerContainer(
|
||||||
key: mainTopic['main_topic'] == 'ECONOMY'
|
key: mainTopic['main_topic'] == 'ECONOMY' || mainTopic['main_topic'] == 'اقتصاد'
|
||||||
? cardTopicKey
|
? cardTopicKey
|
||||||
: null,
|
: null,
|
||||||
text: mainTopic['main_topic'],
|
text: mainTopic['main_topic'],
|
||||||
@ -1042,7 +1042,7 @@ class EconomyStatsState extends ConsumerState<EconomyStatsWidget> {
|
|||||||
SizedBox(
|
SizedBox(
|
||||||
height: myheight / 4.8, // Set dynamic height
|
height: myheight / 4.8, // Set dynamic height
|
||||||
child: Container(
|
child: Container(
|
||||||
key: mainTopic['main_topic'] == 'ECONOMY'
|
key: mainTopic['main_topic'] == 'ECONOMY' || mainTopic['main_topic'] == 'اقتصاد'
|
||||||
? cardsKey
|
? cardsKey
|
||||||
: null,
|
: null,
|
||||||
// color: Colors.grey[200], // Set a background color for the scrollable container
|
// color: Colors.grey[200], // Set a background color for the scrollable container
|
||||||
|
|||||||
@ -712,10 +712,10 @@ class _EditProfileState extends State<EditProfile> {
|
|||||||
// counterText: '',
|
// counterText: '',
|
||||||
enabled: !_isProfileCompleted,
|
enabled: !_isProfileCompleted,
|
||||||
),
|
),
|
||||||
maxLength:
|
// maxLength:
|
||||||
40, // Set the maximum length to 20 characters
|
// 40, // Set the maximum length to 20 characters
|
||||||
maxLengthEnforcement:
|
// maxLengthEnforcement:
|
||||||
MaxLengthEnforcement.enforced,
|
// MaxLengthEnforcement.enforced,
|
||||||
),
|
),
|
||||||
SizedBox(height: 10),
|
SizedBox(height: 10),
|
||||||
Row(
|
Row(
|
||||||
@ -777,8 +777,23 @@ class _EditProfileState extends State<EditProfile> {
|
|||||||
onExit: (_) => setState(
|
onExit: (_) => setState(
|
||||||
() => _isHoveringDropdown = false),
|
() => _isHoveringDropdown = false),
|
||||||
child: DropdownButtonFormField<String>(
|
child: DropdownButtonFormField<String>(
|
||||||
|
style: TextStyle(
|
||||||
|
fontFamily: 'Roboto',
|
||||||
|
fontSize: 16,
|
||||||
|
fontWeight: FontWeight.normal,
|
||||||
|
color: Color(0xFF544C4C),
|
||||||
|
),
|
||||||
value: _selectedCountry,
|
value: _selectedCountry,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
|
enabledBorder:OutlineInputBorder(
|
||||||
|
borderRadius:
|
||||||
|
BorderRadius.circular(10),
|
||||||
|
borderSide: BorderSide(
|
||||||
|
color: MyTheme.topicColor(
|
||||||
|
IndicatorTopic.economy)
|
||||||
|
.shade400,
|
||||||
|
width: 1), // Enabled border
|
||||||
|
),
|
||||||
border: OutlineInputBorder(
|
border: OutlineInputBorder(
|
||||||
borderSide:BorderSide(color: Color(0xFF7296BE),
|
borderSide:BorderSide(color: Color(0xFF7296BE),
|
||||||
),
|
),
|
||||||
@ -937,7 +952,6 @@ class _EditProfileState extends State<EditProfile> {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
SizedBox(height: 20),
|
|
||||||
Center(
|
Center(
|
||||||
child: GestureDetector(
|
child: GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
import 'dart:math';
|
import 'dart:math';
|
||||||
|
import 'package:iconify_design/iconify_design.dart';
|
||||||
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';
|
||||||
@ -686,45 +686,50 @@ class _BaseScaffoldState extends ConsumerState<BaseScaffold> {
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
leading: Stack(
|
leading: Padding(
|
||||||
children: [
|
padding: const EdgeInsets.only(top: 7.0,left: 4),
|
||||||
if (widget.showBackButton == true)
|
child: Row(
|
||||||
Align(
|
mainAxisSize:MainAxisSize.min,
|
||||||
alignment: Alignment.centerLeft,
|
children: [
|
||||||
child: Padding(
|
if (widget.showBackButton == true)
|
||||||
padding: EdgeInsets.only(left: 8),
|
SizedBox(
|
||||||
|
width: 25,
|
||||||
child: IconButton(
|
height: 25,
|
||||||
color: Colors.white,
|
child: IconButton(
|
||||||
icon: const Icon(Icons.arrow_back_ios_new, size: 26),
|
padding: EdgeInsets.zero,
|
||||||
onPressed: () {
|
constraints: BoxConstraints(),
|
||||||
if ((widget.navBackArrow as Text).data == 'home') {
|
color: Colors.white,
|
||||||
context.go('/myhomepage');
|
icon: const Icon(Icons.arrow_back_ios_new, size: 24),
|
||||||
} 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),
|
|
||||||
onPressed: () {
|
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: [
|
children: [
|
||||||
DrawerHeader(
|
DrawerHeader(
|
||||||
child: Column(
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||||
children: [
|
children: [
|
||||||
Row(
|
Row(
|
||||||
@ -810,24 +816,26 @@ class _BaseScaffoldState extends ConsumerState<BaseScaffold> {
|
|||||||
onTap: () => context.go('/notification'),
|
onTap: () => context.go('/notification'),
|
||||||
),
|
),
|
||||||
ListTile(
|
ListTile(
|
||||||
leading: Image.asset(
|
leading: Icon(Icons.message_outlined),
|
||||||
DrawerAssetIconPath.feedback,
|
// leading: Image.asset(
|
||||||
color: Colors.black,
|
// DrawerAssetIconPath.feedback,
|
||||||
width: 20,
|
// color: Colors.black,
|
||||||
height: 20,
|
// width: 20,
|
||||||
),
|
// height: 20,
|
||||||
|
// ),
|
||||||
// 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: () => context.go('/feedback', extra: userName),
|
||||||
),
|
),
|
||||||
if (role == 'admin')
|
if (role == 'admin')
|
||||||
ListTile(
|
ListTile(
|
||||||
leading: Image.asset(
|
leading: Icon(Icons.manage_accounts_outlined),
|
||||||
DrawerAssetIconPath.manageUser,
|
// leading: Image.asset(
|
||||||
color: Colors.black,
|
// DrawerAssetIconPath.manageUser,
|
||||||
width: 20,
|
// color: Colors.black,
|
||||||
height: 20,
|
// width: 20,
|
||||||
),
|
// height: 20,
|
||||||
|
// ),
|
||||||
// title: Text('Manage User'),
|
// title: Text('Manage User'),
|
||||||
title: Text(
|
title: Text(
|
||||||
AppLocalizations.of(context)!.manage_user,
|
AppLocalizations.of(context)!.manage_user,
|
||||||
@ -843,12 +851,13 @@ class _BaseScaffoldState extends ConsumerState<BaseScaffold> {
|
|||||||
onTap: () => context.go('/bookmark'),
|
onTap: () => context.go('/bookmark'),
|
||||||
),
|
),
|
||||||
ListTile(
|
ListTile(
|
||||||
leading: Image.asset(
|
leading: Icon(Icons.menu_book_outlined),
|
||||||
DrawerAssetIconPath.guide,
|
// leading: Image.asset(
|
||||||
color: Colors.black,
|
// DrawerAssetIconPath.guide,
|
||||||
width: 20,
|
// color: Colors.black,
|
||||||
height: 20,
|
// width: 20,
|
||||||
),
|
// height: 20,
|
||||||
|
// ),
|
||||||
// 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: () => 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;
|
if (!context.mounted) return;
|
||||||
context.pop();
|
context.pop();
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user