diff --git a/assets/icons/misc/Search.svg b/assets/icons/misc/Search.svg
new file mode 100644
index 00000000..076d7f9a
--- /dev/null
+++ b/assets/icons/misc/Search.svg
@@ -0,0 +1,3 @@
+
diff --git a/assets/icons/uae_numbers/Filter.svg b/assets/icons/uae_numbers/Filter.svg
new file mode 100644
index 00000000..131ae70c
--- /dev/null
+++ b/assets/icons/uae_numbers/Filter.svg
@@ -0,0 +1,3 @@
+
diff --git a/lib/infrastructure/services/img_asset_paths/icons/misc_icon_asset_path.dart b/lib/infrastructure/services/img_asset_paths/icons/misc_icon_asset_path.dart
index 0b01da5f..3b1a35a7 100644
--- a/lib/infrastructure/services/img_asset_paths/icons/misc_icon_asset_path.dart
+++ b/lib/infrastructure/services/img_asset_paths/icons/misc_icon_asset_path.dart
@@ -12,5 +12,5 @@ abstract class MiscIconAssetPath {
static const save = '$_basePath/save.png';
static const group = '$_basePath/group.png';
static const search = '$_basePath/search.png';
-
+ static const Search = '$_basePath/Search.svg';
}
diff --git a/lib/infrastructure/services/img_asset_paths/icons/uae_numbers_asset_path.dart b/lib/infrastructure/services/img_asset_paths/icons/uae_numbers_asset_path.dart
index 167127df..6cec49e3 100644
--- a/lib/infrastructure/services/img_asset_paths/icons/uae_numbers_asset_path.dart
+++ b/lib/infrastructure/services/img_asset_paths/icons/uae_numbers_asset_path.dart
@@ -6,5 +6,6 @@ abstract class UaeNumbersAssetPath {
// static const bookmarksSelectedUae = '$_basePath/bookmarksSelectedUae.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';
+ static const filterCharts = '$_basePath/Filter.svg';
}
diff --git a/lib/l10n/intl_ar.arb b/lib/l10n/intl_ar.arb
index c6b55469..6e680d81 100644
--- a/lib/l10n/intl_ar.arb
+++ b/lib/l10n/intl_ar.arb
@@ -1,8 +1,8 @@
{
"all_bookmarks":"كل العلامات المرجعية",
- "economy_title":" الاقتصاد",
+ "economy_title":"اقتصاد",
"social_title":"اجتماعي",
- "environment_title":"البيئة",
+ "environment_title":"بيئة",
"bookmarks": "الإشارات المرجعية",
"feedback_title": "تعليق",
diff --git a/lib/presentation/Screens/Bottom Navigation Pages/UAE_Numbers/uae_numbers.dart b/lib/presentation/Screens/Bottom Navigation Pages/UAE_Numbers/uae_numbers.dart
index 86daad93..9f419cfa 100644
--- a/lib/presentation/Screens/Bottom Navigation Pages/UAE_Numbers/uae_numbers.dart
+++ b/lib/presentation/Screens/Bottom Navigation Pages/UAE_Numbers/uae_numbers.dart
@@ -2,6 +2,7 @@ import 'dart:convert';
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
+import 'package:flutter_svg/svg.dart';
import 'package:go_router/go_router.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';
@@ -199,11 +200,13 @@ class _UaenumberWidgetState extends ConsumerState {
decoration: InputDecoration(
hintText: "Search",
hintStyle: TextStyle(color: Color(0xFF898C81)),
-
- prefixIcon: Image(
- image: ExactAssetImage(MiscIconAssetPath.search),
- width: 24,
- height: 24,
+ prefixIconConstraints: BoxConstraints(maxWidth: 42, maxHeight: 42),
+ prefixIcon: Container(
+ padding: EdgeInsets.only(right: 5),
+ child: SvgPicture.asset(
+ MiscIconAssetPath.Search,
+ semanticsLabel: 'Search',
+ ),
),
// prefixIcon: Image.asset(
diff --git a/lib/presentation/Screens/auth_verification/create_new_pw.dart b/lib/presentation/Screens/auth_verification/create_new_pw.dart
index a0303f4a..e8391ba0 100644
--- a/lib/presentation/Screens/auth_verification/create_new_pw.dart
+++ b/lib/presentation/Screens/auth_verification/create_new_pw.dart
@@ -33,7 +33,7 @@ class _CreateNewPwState extends ConsumerState {
bool _obscureNewPassword = true;
bool _obscureConfirmPassword = true;
bool _isPasswordUpdated = false; // Variable to toggle UI
-
+ bool hasValidated = false;
String? _oldPassword;
String? _newPassword;
String? _confirmPassword;
@@ -243,10 +243,12 @@ class _CreateNewPwState extends ConsumerState {
pathColorWhenOn: Colors.grey.shade300,
pathColorWhenOff: Colors.grey.shade300,
onTap: () {
+ print('has validated $hasValidated');
final formState = _formKey.currentState;
ref.read(localeProvider.notifier).toggleLocale();
Future.delayed(Duration(milliseconds: 100), () {
- if (formState?.validate() == false) {
+ if (hasValidated && formState?.validate() == false) {
+ print('has validated $hasValidated');
formState?.validate();
}
});
@@ -582,6 +584,9 @@ class _CreateNewPwState extends ConsumerState {
width: screenWidth / 1.1,
child: ElevatedButton(
onPressed: () async {
+ setState(() {
+ hasValidated=true;
+ });
if ((_formKey.currentState?.validate() ?? false)) {
await updatePassword(
widget.userId,
diff --git a/lib/presentation/Screens/auth_verification/registration.dart b/lib/presentation/Screens/auth_verification/registration.dart
index e9faf1f5..90e4aceb 100644
--- a/lib/presentation/Screens/auth_verification/registration.dart
+++ b/lib/presentation/Screens/auth_verification/registration.dart
@@ -28,7 +28,7 @@ class _RegisterScreenState extends ConsumerState {
final _emailController = TextEditingController();
final _passwordController = TextEditingController();
final _confirmpasswordController = TextEditingController();
-
+ bool hasValidated = false;
bool _obscurePassword = true;
bool _obscureConfirmPassword = true;
bool isChecked = false;
@@ -217,6 +217,9 @@ class _RegisterScreenState extends ConsumerState {
}
Future _registerUser() async {
+ setState(() {
+ hasValidated = true;
+ });
if (_formKey.currentState?.validate() ?? false) {
if (isChecked) {
setState(() {
@@ -387,7 +390,7 @@ class _RegisterScreenState extends ConsumerState {
final formState = _formKey.currentState;
ref.read(localeProvider.notifier).toggleLocale();
Future.delayed(Duration(milliseconds: 100), () {
- if (formState?.validate() == false) {
+ if (hasValidated && formState?.validate() == false) {
formState?.validate();
}
});
@@ -1111,11 +1114,11 @@ class _RegisterScreenState extends ConsumerState {
?.languageCode ==
'ar'
? 0
- : 30.0,
+ : 40.0,
right: registerLocale
?.languageCode ==
'ar'
- ? 40
+ ? 45
: 0.0,),
child: Text(
context.translate('Required', 'مطلوب'),
diff --git a/lib/presentation/Screens/charts/screens/chart_screen.dart b/lib/presentation/Screens/charts/screens/chart_screen.dart
index ab95b72b..a2487614 100644
--- a/lib/presentation/Screens/charts/screens/chart_screen.dart
+++ b/lib/presentation/Screens/charts/screens/chart_screen.dart
@@ -1535,11 +1535,12 @@ class _ChartScreen1State extends ConsumerState {
children: [
Row(
children: [
- Image.asset(
- UaeNumbersAssetPath.filterUae,
- color: Color(0xFF8E8E8E), // Outline color
- width: 24, // Slightly larger
- height: 24,
+ SvgPicture.asset(
+ UaeNumbersAssetPath.filterCharts,
+ semanticsLabel: 'Filter',
+ colorFilter:ColorFilter.mode(Color(0xFF8E8E8E),BlendMode.srcIn),
+ width: 25,
+ height: 25,
),
SizedBox(width: 8),
Text(
@@ -2265,12 +2266,11 @@ class _ChartScreen1State extends ConsumerState {
),
),
SizedBox(width: 10),
- Image.asset(
- UaeNumbersAssetPath.filterUae,
- color: Colors
- .white, // Set color to white
- width: 21,
- height: 21,
+ SvgPicture.asset(
+ UaeNumbersAssetPath.filterCharts,
+ semanticsLabel: 'Filter',
+ width: 24,
+ height: 24,
),
],
),
diff --git a/lib/presentation/Screens/profilepage.dart b/lib/presentation/Screens/profilepage.dart
index 194aa8bc..104b5e24 100644
--- a/lib/presentation/Screens/profilepage.dart
+++ b/lib/presentation/Screens/profilepage.dart
@@ -37,7 +37,7 @@ class ProfileScreen extends ConsumerStatefulWidget {
class _ProfileScreenState extends ConsumerState {
final _pb = PocketBase(apiUrl);
// final _pb = PocketBase('http://127.0.0.1:8090');
-
+ bool hasValidated = false;
// Add focus nodes and hint states
final List _focusNodes = List.generate(4, (_) => FocusNode());
final List _showHints = [
@@ -457,6 +457,7 @@ class _ProfileScreenState extends ConsumerState {
@override
Widget build(BuildContext context) {
+ final profileLocale = ref.watch(localeProvider);
return PopScope(
canPop: false, // Allow back navigation only if not login screen
onPopInvokedWithResult: (didPop, result) {
@@ -489,7 +490,13 @@ class _ProfileScreenState extends ConsumerState {
pathColorWhenOn: Colors.grey.shade300,
pathColorWhenOff: Colors.grey.shade300,
onTap: () {
+ final formState = _formKey.currentState;
ref.read(localeProvider.notifier).toggleLocale();
+ Future.delayed(Duration(milliseconds: 100), () {
+ if (hasValidated && formState?.validate() == false) {
+ formState?.validate();
+ }
+ });
},
);
},
@@ -785,7 +792,7 @@ class _ProfileScreenState extends ConsumerState {
),
borderRadius: BorderRadius.circular(8),
),
- labelText: 'Select',
+ labelText: context.translate('Select',' اختيار')
),
icon: Icon(Icons.keyboard_arrow_down_sharp,
color:
@@ -911,7 +918,11 @@ class _ProfileScreenState extends ConsumerState {
mainAxisAlignment: MainAxisAlignment.start,
children: [
Padding(
- padding: const EdgeInsets.only(left: 10.0),
+ padding: EdgeInsets.only(left: 10.0, right: profileLocale
+ ?.languageCode ==
+ 'ar'
+ ? 15
+ : 0.0,),
child: Text(
context.translate('Required', 'مطلوب'),
style: TextStyle(
@@ -948,6 +959,9 @@ class _ProfileScreenState extends ConsumerState {
// ElevatedButton.icon(
ElevatedButton(
onPressed: () {
+ setState(() {
+ hasValidated = true;
+ });
if ((_formKey.currentState?.validate() ?? false) &&
(isChecked)) {
_formKey.currentState?.save();
diff --git a/lib/presentation/components/themed_text_field.dart b/lib/presentation/components/themed_text_field.dart
index 82b58ce6..843a7876 100644
--- a/lib/presentation/components/themed_text_field.dart
+++ b/lib/presentation/components/themed_text_field.dart
@@ -45,7 +45,7 @@ class ThemedFormField extends HookWidget {
final inputDecoration = InputDecoration(
filled: true,
fillColor: Colors.white,
- contentPadding: const EdgeInsets.symmetric(vertical: 14),
+ contentPadding: const EdgeInsets.symmetric(vertical: 14, horizontal: 15),
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(10),
borderSide: BorderSide(
diff --git a/lib/presentation/routes/auth_routes/login_route.dart b/lib/presentation/routes/auth_routes/login_route.dart
index c7a386dd..7ee43de6 100644
--- a/lib/presentation/routes/auth_routes/login_route.dart
+++ b/lib/presentation/routes/auth_routes/login_route.dart
@@ -127,6 +127,7 @@ class LoginRoute extends HookConsumerWidget {
@override
Widget build(BuildContext context, WidgetRef ref) {
+ final hasValidated = useState(false);
final locale = ref.watch(localeProvider);
final emailCtl = useTextEditingController();
final pwCtl = useTextEditingController();
@@ -272,6 +273,7 @@ class LoginRoute extends HookConsumerWidget {
width: double.infinity,
child: ElevatedButton(
onPressed: () async {
+ hasValidated.value=true;
final isValid = formKey.currentState!.validate();
if (!isValid) return;
final session = await context.loaderWithErrorDialog(
@@ -680,7 +682,7 @@ class LoginRoute extends HookConsumerWidget {
final formState = formKey.currentState;
ref.read(localeProvider.notifier).toggleLocale();
Future.delayed(Duration(milliseconds: 100), () {
- if (formState?.validate() == false) {
+ if (hasValidated.value && formState?.validate() == false) {
formState?.validate();
}
});
diff --git a/lib/presentation/routes/drawer_routes/Drawer Items/bookmark.dart b/lib/presentation/routes/drawer_routes/Drawer Items/bookmark.dart
index f4489c09..510d727d 100644
--- a/lib/presentation/routes/drawer_routes/Drawer Items/bookmark.dart
+++ b/lib/presentation/routes/drawer_routes/Drawer Items/bookmark.dart
@@ -25,19 +25,11 @@ class _BookMarkState extends ConsumerState {
final _pb = PocketBase(apiUrl);
List