bookmark message color change
This commit is contained in:
parent
cd1bb0fc8c
commit
de820662f7
@ -6,6 +6,7 @@ import 'package:pocketbase/pocketbase.dart';
|
|||||||
import 'package:uae_stat/config/api_config.dart';
|
import 'package:uae_stat/config/api_config.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/banner_asset_path.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/indicators/locale_provider.dart';
|
||||||
@ -13,7 +14,7 @@ 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';
|
||||||
|
|
||||||
import '../../../config/my_theme.dart';
|
import 'package:uae_stat/config/my_theme.dart';
|
||||||
|
|
||||||
class CreateNewPw extends ConsumerStatefulWidget {
|
class CreateNewPw extends ConsumerStatefulWidget {
|
||||||
final String userId;
|
final String userId;
|
||||||
@ -38,6 +39,11 @@ class _CreateNewPwState extends ConsumerState<CreateNewPw> {
|
|||||||
String? _newPassword;
|
String? _newPassword;
|
||||||
String? _confirmPassword;
|
String? _confirmPassword;
|
||||||
|
|
||||||
|
final fcscBanner = Image.asset(
|
||||||
|
BannerAssetPath.fcsc,
|
||||||
|
height: 40,
|
||||||
|
);
|
||||||
|
|
||||||
String? _validateOldPassword(String? value) {
|
String? _validateOldPassword(String? value) {
|
||||||
if (value == null || value.isEmpty) {
|
if (value == null || value.isEmpty) {
|
||||||
return AppLocalizations.of(context)!.old_password_is_required;
|
return AppLocalizations.of(context)!.old_password_is_required;
|
||||||
@ -624,16 +630,17 @@ class _CreateNewPwState extends ConsumerState<CreateNewPw> {
|
|||||||
),
|
),
|
||||||
SizedBox(height: screenHeight / 5),
|
SizedBox(height: screenHeight / 5),
|
||||||
Center(
|
Center(
|
||||||
child: Container(
|
// child: Container(
|
||||||
height: screenHeight / 16,
|
// height: screenHeight / 16,
|
||||||
width: screenWidth / 2.5,
|
// width: screenWidth / 2.5,
|
||||||
decoration: BoxDecoration(
|
// decoration: BoxDecoration(
|
||||||
image: DecorationImage(
|
// image: DecorationImage(
|
||||||
image: AssetImage("assets/splash_screen/logo.png"),
|
// image: AssetImage("assets/splash_screen/logo.png"),
|
||||||
fit: BoxFit.fill,
|
// fit: BoxFit.fill,
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
|
child: fcscBanner,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@ -718,16 +725,17 @@ class _CreateNewPwState extends ConsumerState<CreateNewPw> {
|
|||||||
),
|
),
|
||||||
SizedBox(height: screenHeight / 2.2),
|
SizedBox(height: screenHeight / 2.2),
|
||||||
Center(
|
Center(
|
||||||
child: Container(
|
// child: Container(
|
||||||
height: 40,
|
// height: 40,
|
||||||
width: screenWidth / 2.5,
|
// width: screenWidth / 2.5,
|
||||||
decoration: BoxDecoration(
|
// decoration: BoxDecoration(
|
||||||
image: DecorationImage(
|
// image: DecorationImage(
|
||||||
image: AssetImage("assets/splash_screen/logo.png"),
|
// image: AssetImage("assets/splash_screen/logo.png"),
|
||||||
fit: BoxFit.fill,
|
// fit: BoxFit.fill,
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
|
child: fcscBanner,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|||||||
@ -171,10 +171,7 @@ class _ChartScreen1State extends ConsumerState<ChartScreen1> {
|
|||||||
SnackBar(
|
SnackBar(
|
||||||
content: Text(
|
content: Text(
|
||||||
AppLocalizations.of(context)!.added_to_Bookmark,
|
AppLocalizations.of(context)!.added_to_Bookmark,
|
||||||
style: TextStyle(
|
|
||||||
color: Color(0xFF2F692C), fontWeight: FontWeight.w600),
|
|
||||||
),
|
),
|
||||||
backgroundColor: Color(0xFFD6E9C6),
|
|
||||||
duration: Duration(seconds: 2),
|
duration: Duration(seconds: 2),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
@ -185,10 +182,10 @@ class _ChartScreen1State extends ConsumerState<ChartScreen1> {
|
|||||||
SnackBar(
|
SnackBar(
|
||||||
content: Text(
|
content: Text(
|
||||||
AppLocalizations.of(context)!.failed_To_Remove,
|
AppLocalizations.of(context)!.failed_To_Remove,
|
||||||
style: TextStyle(
|
// style: TextStyle(
|
||||||
color: Color(0xFF544C4C), fontWeight: FontWeight.w600),
|
// color: Color(0xFF544C4C), fontWeight: FontWeight.w600),
|
||||||
),
|
),
|
||||||
backgroundColor: Color(0xFFEB5F24),
|
// backgroundColor: Color(0xFFEB5F24),
|
||||||
duration: Duration(seconds: 2),
|
duration: Duration(seconds: 2),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
@ -217,10 +214,7 @@ class _ChartScreen1State extends ConsumerState<ChartScreen1> {
|
|||||||
SnackBar(
|
SnackBar(
|
||||||
content: Text(
|
content: Text(
|
||||||
AppLocalizations.of(context)!.removed_from_Bookmark,
|
AppLocalizations.of(context)!.removed_from_Bookmark,
|
||||||
style: TextStyle(
|
|
||||||
color: Color(0xFF2F692C), fontWeight: FontWeight.w600),
|
|
||||||
),
|
),
|
||||||
backgroundColor: Color(0xFFD6E9C6),
|
|
||||||
duration: Duration(seconds: 2),
|
duration: Duration(seconds: 2),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
@ -231,10 +225,10 @@ class _ChartScreen1State extends ConsumerState<ChartScreen1> {
|
|||||||
SnackBar(
|
SnackBar(
|
||||||
content: Text(
|
content: Text(
|
||||||
'Failed to Remove',
|
'Failed to Remove',
|
||||||
style: TextStyle(
|
// style: TextStyle(
|
||||||
color: Color(0xFF544C4C), fontWeight: FontWeight.w600),
|
// color: Color(0xFF544C4C), fontWeight: FontWeight.w600),
|
||||||
),
|
),
|
||||||
backgroundColor: Color(0xFFEB5F24),
|
// backgroundColor: Color(0xFFEB5F24),
|
||||||
duration: Duration(seconds: 2),
|
duration: Duration(seconds: 2),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
@ -282,6 +276,9 @@ class _ChartScreen1State extends ConsumerState<ChartScreen1> {
|
|||||||
),
|
),
|
||||||
actions: [
|
actions: [
|
||||||
SizedBox(height: 20),
|
SizedBox(height: 20),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||||
|
children: [
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: 100, // Set the desired width
|
width: 100, // Set the desired width
|
||||||
child: TextButton(
|
child: TextButton(
|
||||||
@ -326,6 +323,9 @@ class _ChartScreen1State extends ConsumerState<ChartScreen1> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -369,7 +369,9 @@ class _ChartScreen1State extends ConsumerState<ChartScreen1> {
|
|||||||
),
|
),
|
||||||
actions: [
|
actions: [
|
||||||
SizedBox(height: 20),
|
SizedBox(height: 20),
|
||||||
SizedBox(
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||||
|
children: [ SizedBox(
|
||||||
width: 100, // Set the desired width
|
width: 100, // Set the desired width
|
||||||
child: TextButton(
|
child: TextButton(
|
||||||
onPressed: () => Navigator.pop(context),
|
onPressed: () => Navigator.pop(context),
|
||||||
@ -411,6 +413,7 @@ class _ChartScreen1State extends ConsumerState<ChartScreen1> {
|
|||||||
style: TextStyle(color: Colors.white, fontSize: 16),
|
style: TextStyle(color: Colors.white, fontSize: 16),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),],
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|||||||
@ -1018,7 +1018,7 @@ class ConfirmationDialog extends StatelessWidget {
|
|||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
"Are you sure you want to save this page?",
|
AppLocalizations.of(context)!.sure_save_page,
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
color: Color(0xFF898C81),
|
color: Color(0xFF898C81),
|
||||||
@ -1030,7 +1030,7 @@ class ConfirmationDialog extends StatelessWidget {
|
|||||||
SizedBox(height: 8),
|
SizedBox(height: 8),
|
||||||
Text.rich(
|
Text.rich(
|
||||||
TextSpan(
|
TextSpan(
|
||||||
text: "Once saved, you will not be able to change your ",
|
text: AppLocalizations.of(context)!.not_able_to_change,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
color: Color(0xFF898C81),
|
color: Color(0xFF898C81),
|
||||||
@ -1039,15 +1039,15 @@ class ConfirmationDialog extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
children: [
|
children: [
|
||||||
TextSpan(
|
TextSpan(
|
||||||
text: "Name",
|
text: AppLocalizations.of(context)!.name,
|
||||||
style:
|
style:
|
||||||
TextStyle(fontWeight: FontWeight.w700), // Bold for "name"
|
TextStyle(fontWeight: FontWeight.w700), // Bold for "name"
|
||||||
),
|
),
|
||||||
TextSpan(
|
TextSpan(
|
||||||
text: " or ",
|
text: context.translate(' or ','أو'),
|
||||||
),
|
),
|
||||||
TextSpan(
|
TextSpan(
|
||||||
text: "Date of birth",
|
text: AppLocalizations.of(context)!.dob,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontWeight: FontWeight.w700), // Bold for "date of birth"
|
fontWeight: FontWeight.w700), // Bold for "date of birth"
|
||||||
),
|
),
|
||||||
|
|||||||
@ -151,18 +151,6 @@ class _BookMarkState extends ConsumerState<BookMark> {
|
|||||||
await _pb.collection('bookmark').delete(bookmarkId!, headers: {
|
await _pb.collection('bookmark').delete(bookmarkId!, headers: {
|
||||||
'Authorization': adminToken,
|
'Authorization': adminToken,
|
||||||
});
|
});
|
||||||
// Show success SnackBar
|
|
||||||
// ScaffoldMessenger.of(context).showSnackBar(
|
|
||||||
// const SnackBar(
|
|
||||||
// content: Text(
|
|
||||||
// 'Removed from Bookmark.',
|
|
||||||
// style: TextStyle(
|
|
||||||
// color: Color(0xFF2F692C), fontWeight: FontWeight.w600),
|
|
||||||
// ),
|
|
||||||
// backgroundColor: Color(0xFFD6E9C6),
|
|
||||||
// duration: Duration(seconds: 2),
|
|
||||||
// ),
|
|
||||||
// );
|
|
||||||
final locale = ref.read(localeProvider);
|
final locale = ref.read(localeProvider);
|
||||||
fetchBookmarks(locale?.languageCode ?? 'en');
|
fetchBookmarks(locale?.languageCode ?? 'en');
|
||||||
// ToastUtil.showSuccessToast("Removed from Bookmark.");
|
// ToastUtil.showSuccessToast("Removed from Bookmark.");
|
||||||
@ -170,11 +158,8 @@ class _BookMarkState extends ConsumerState<BookMark> {
|
|||||||
ScaffoldMessenger.of(context).showSnackBar(
|
ScaffoldMessenger.of(context).showSnackBar(
|
||||||
SnackBar(
|
SnackBar(
|
||||||
content: Text(
|
content: Text(
|
||||||
'Removed From Bookmark',
|
AppLocalizations.of(context)!.removed_from_Bookmark,
|
||||||
style: TextStyle(color: Color(0xFF2F692C),
|
|
||||||
fontWeight: FontWeight.w500),
|
|
||||||
),
|
),
|
||||||
backgroundColor: Color(0xFFD6E9C6),
|
|
||||||
duration: Duration(seconds: 2),
|
duration: Duration(seconds: 2),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
@ -613,18 +598,7 @@ class _BookMarkState extends ConsumerState<BookMark> {
|
|||||||
GestureDetector(
|
GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
debugPrint("Icon clicked in: ${data['title']}");
|
debugPrint("Icon clicked in: ${data['title']}");
|
||||||
removeBookmark(data['id']);
|
showRemoveBookmarkDialog(data['id']);
|
||||||
// ScaffoldMessenger.of(context).showSnackBar(
|
|
||||||
// SnackBar(
|
|
||||||
// content: Text(
|
|
||||||
// context.translate('Removed From Bookmark','تمت الإزالة من العلامات المرجعية'),
|
|
||||||
// // style: TextStyle(color: Color(0xFF2F692C),
|
|
||||||
// // fontWeight: FontWeight.w500),
|
|
||||||
// ),
|
|
||||||
// // backgroundColor: Color(0xFFD6E9C6),
|
|
||||||
// duration: Duration(seconds: 2),
|
|
||||||
// ),
|
|
||||||
// );
|
|
||||||
},
|
},
|
||||||
child: SvgPicture.asset(
|
child: SvgPicture.asset(
|
||||||
BookmarkAssetPath.delete,
|
BookmarkAssetPath.delete,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user