chore: clean up unused imports, update routing for authentication pages, and enhance UI components in the profile and captcha widgets
This commit is contained in:
@@ -16,7 +16,6 @@ export 'package:flutter_map_animations/flutter_map_animations.dart';
|
||||
export 'package:flutter_map_marker_cluster/flutter_map_marker_cluster.dart';
|
||||
export 'package:flutter_map_tile_caching/flutter_map_tile_caching.dart' hide DownloadProgress;
|
||||
export 'package:flutter_rating_bar/flutter_rating_bar.dart';
|
||||
export 'package:device_preview_plus/device_preview_plus.dart';
|
||||
export 'package:flutter_screenutil/flutter_screenutil.dart' hide DeviceType;
|
||||
export 'package:flutter_secure_storage/flutter_secure_storage.dart';
|
||||
export 'package:flutter_slidable/flutter_slidable.dart';
|
||||
@@ -36,8 +35,7 @@ export 'package:image_cropper/image_cropper.dart';
|
||||
///image picker
|
||||
export 'package:image_picker/image_picker.dart';
|
||||
|
||||
//encryption
|
||||
//export 'package:encrypt/encrypt.dart' show Encrypted;
|
||||
|
||||
|
||||
//Map and location
|
||||
export 'package:latlong2/latlong.dart';
|
||||
|
||||
@@ -49,6 +49,9 @@ class $AssetsIconsGen {
|
||||
/// File path: assets/icons/bg_auth.svg
|
||||
SvgGenImage get bgAuth => const SvgGenImage('assets/icons/bg_auth.svg');
|
||||
|
||||
/// File path: assets/icons/bg_auth_dam.svg
|
||||
SvgGenImage get bgAuthDam => const SvgGenImage('assets/icons/bg_auth_dam.svg');
|
||||
|
||||
/// File path: assets/icons/bg_header_user_profile.svg
|
||||
SvgGenImage get bgHeaderUserProfile => const SvgGenImage('assets/icons/bg_header_user_profile.svg');
|
||||
|
||||
@@ -163,6 +166,9 @@ class $AssetsIconsGen {
|
||||
/// File path: assets/icons/cube_watting.svg
|
||||
SvgGenImage get cubeWatting => const SvgGenImage('assets/icons/cube_watting.svg');
|
||||
|
||||
/// File path: assets/icons/dam_pattern.svg
|
||||
SvgGenImage get damPattern => const SvgGenImage('assets/icons/dam_pattern.svg');
|
||||
|
||||
/// File path: assets/icons/diagram.svg
|
||||
SvgGenImage get diagram => const SvgGenImage('assets/icons/diagram.svg');
|
||||
|
||||
@@ -396,6 +402,7 @@ class $AssetsIconsGen {
|
||||
arrowLeft,
|
||||
arrowRight,
|
||||
bgAuth,
|
||||
bgAuthDam,
|
||||
bgHeaderUserProfile,
|
||||
boxRemove,
|
||||
boxTick,
|
||||
@@ -434,6 +441,7 @@ class $AssetsIconsGen {
|
||||
cubeSearch,
|
||||
cubeTopRotation,
|
||||
cubeWatting,
|
||||
damPattern,
|
||||
diagram,
|
||||
directPurchase,
|
||||
download,
|
||||
@@ -568,6 +576,9 @@ class $AssetsVecGen {
|
||||
/// File path: assets/vec/bg_auth.svg.vec
|
||||
SvgGenImage get bgAuthSvg => const SvgGenImage.vec('assets/vec/bg_auth.svg.vec');
|
||||
|
||||
/// File path: assets/vec/bg_auth_dam.svg.vec
|
||||
SvgGenImage get bgAuthDamSvg => const SvgGenImage.vec('assets/vec/bg_auth_dam.svg.vec');
|
||||
|
||||
/// File path: assets/vec/bg_header_user_profile.svg.vec
|
||||
SvgGenImage get bgHeaderUserProfileSvg => const SvgGenImage.vec('assets/vec/bg_header_user_profile.svg.vec');
|
||||
|
||||
@@ -682,6 +693,9 @@ class $AssetsVecGen {
|
||||
/// File path: assets/vec/cube_watting.svg.vec
|
||||
SvgGenImage get cubeWattingSvg => const SvgGenImage.vec('assets/vec/cube_watting.svg.vec');
|
||||
|
||||
/// File path: assets/vec/dam_pattern.svg.vec
|
||||
SvgGenImage get damPatternSvg => const SvgGenImage.vec('assets/vec/dam_pattern.svg.vec');
|
||||
|
||||
/// File path: assets/vec/diagram.svg.vec
|
||||
SvgGenImage get diagramSvg => const SvgGenImage.vec('assets/vec/diagram.svg.vec');
|
||||
|
||||
@@ -915,6 +929,7 @@ class $AssetsVecGen {
|
||||
arrowLeftSvg,
|
||||
arrowRightSvg,
|
||||
bgAuthSvg,
|
||||
bgAuthDamSvg,
|
||||
bgHeaderUserProfileSvg,
|
||||
boxRemoveSvg,
|
||||
boxTickSvg,
|
||||
@@ -953,6 +968,7 @@ class $AssetsVecGen {
|
||||
cubeSearchSvg,
|
||||
cubeTopRotationSvg,
|
||||
cubeWattingSvg,
|
||||
damPatternSvg,
|
||||
diagramSvg,
|
||||
directPurchaseSvg,
|
||||
downloadSvg,
|
||||
|
||||
@@ -132,6 +132,8 @@ class _RTextFieldState extends State<RTextField> {
|
||||
late TextDirection textDirection;
|
||||
|
||||
Timer? _debounceTimer;
|
||||
final GlobalKey<FormFieldState<String>> _formFieldKey =
|
||||
GlobalKey<FormFieldState<String>>();
|
||||
|
||||
TextDirection _detectDirection(String text) {
|
||||
final isPersian = RegExp(r'[\u0600-\u06FF]').hasMatch(text);
|
||||
@@ -196,13 +198,29 @@ class _RTextFieldState extends State<RTextField> {
|
||||
return widget.suffixIcon;
|
||||
}
|
||||
|
||||
double _calculateHeight() {
|
||||
if (!widget.isFullHeight) {
|
||||
return widget.height;
|
||||
}
|
||||
|
||||
// اگر خطا وجود دارد، ارتفاع اضافی برای نمایش خطا اضافه میکنیم
|
||||
final hasError = _formFieldKey.currentState?.hasError ?? false;
|
||||
if (hasError) {
|
||||
// ارتفاع خطا تقریباً 20 پیکسل است (یک خط متن خطا)
|
||||
return widget.height + 20;
|
||||
}
|
||||
|
||||
return widget.height;
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return SizedBox(
|
||||
height: (widget.height).h,
|
||||
height: _calculateHeight().h,
|
||||
child: Padding(
|
||||
padding: widget.padding ?? EdgeInsets.zero,
|
||||
child: TextFormField(
|
||||
key: _formFieldKey,
|
||||
textAlignVertical: TextAlignVertical.center,
|
||||
controller: widget.controller,
|
||||
focusNode: widget.focusNode,
|
||||
@@ -210,8 +228,21 @@ class _RTextFieldState extends State<RTextField> {
|
||||
readOnly: widget.readonly,
|
||||
minLines: widget.minLines,
|
||||
maxLines: widget.maxLines,
|
||||
onChanged: widget.onChanged,
|
||||
validator: widget.validator,
|
||||
onChanged: (value) {
|
||||
widget.onChanged?.call(value);
|
||||
},
|
||||
validator: (value) {
|
||||
final error = widget.validator?.call(value);
|
||||
|
||||
if (widget.isFullHeight) {
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
if (mounted) {
|
||||
setState(() {});
|
||||
}
|
||||
});
|
||||
}
|
||||
return error;
|
||||
},
|
||||
inputFormatters: widget.inputFormatters,
|
||||
enabled: widget.enabled,
|
||||
obscureText: obscure,
|
||||
|
||||
@@ -49,14 +49,6 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.7.0"
|
||||
asn1lib:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: asn1lib
|
||||
sha256: "9a8f69025044eb466b9b60ef3bc3ac99b4dc6c158ae9c56d25eeccf5bc56d024"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.6.5"
|
||||
async:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -337,14 +329,6 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.7.11"
|
||||
device_frame_plus:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: device_frame_plus
|
||||
sha256: ccc94abccd4d9f0a9f19ef239001b3a59896e678ad42601371d7065889f2bf78
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.5.0"
|
||||
device_info_plus:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@@ -361,14 +345,6 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "7.0.3"
|
||||
device_preview_plus:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: device_preview_plus
|
||||
sha256: eb3e67929c9f04759e0d3708ad91d1018235549bcf8699f8a94909684c6555ae
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.5.5"
|
||||
dio:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@@ -385,14 +361,6 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.1"
|
||||
encrypt:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: encrypt
|
||||
sha256: "62d9aa4670cc2a8798bab89b39fc71b6dfbacf615de6cf5001fb39f7e4a996a2"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "5.0.3"
|
||||
fake_async:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -1309,14 +1277,6 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.8"
|
||||
pointycastle:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: pointycastle
|
||||
sha256: "4be0097fcf3fd3e8449e53730c631200ebc7b88016acecab2b0da2f0149222fe"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.9.1"
|
||||
pool:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -1373,22 +1333,6 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.5.0"
|
||||
rive:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: rive
|
||||
sha256: "2551a44fa766a7ed3f52aa2b94feda6d18d00edc25dee5f66e72e9b365bb6d6c"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.13.20"
|
||||
rive_common:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: rive_common
|
||||
sha256: "2ba42f80d37a4efd0696fb715787c4785f8a13361e8aea9227c50f1e78cf763a"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.4.15"
|
||||
rxdart:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@@ -1405,62 +1349,6 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.1.1"
|
||||
shared_preferences:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: shared_preferences
|
||||
sha256: "2939ae520c9024cb197fc20dee269cd8cdbf564c8b5746374ec6cacdc5169e64"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.5.4"
|
||||
shared_preferences_android:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: shared_preferences_android
|
||||
sha256: "83af5c682796c0f7719c2bbf74792d113e40ae97981b8f266fa84574573556bc"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.4.18"
|
||||
shared_preferences_foundation:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: shared_preferences_foundation
|
||||
sha256: "4e7eaffc2b17ba398759f1151415869a34771ba11ebbccd1b0145472a619a64f"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.5.6"
|
||||
shared_preferences_linux:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: shared_preferences_linux
|
||||
sha256: "580abfd40f415611503cae30adf626e6656dfb2f0cee8f465ece7b6defb40f2f"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.4.1"
|
||||
shared_preferences_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: shared_preferences_platform_interface
|
||||
sha256: "57cbf196c486bc2cf1f02b85784932c6094376284b3ad5779d1b1c6c6a816b80"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.4.1"
|
||||
shared_preferences_web:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: shared_preferences_web
|
||||
sha256: c49bd060261c9a3f0ff445892695d6212ff603ef3115edbb448509d407600019
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.4.3"
|
||||
shared_preferences_windows:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: shared_preferences_windows
|
||||
sha256: "94ef0f72b2d71bc3e700e025db3710911bd51a71cefb65cc609dd0d9a982e3c1"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.4.1"
|
||||
shelf:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -1836,4 +1724,4 @@ packages:
|
||||
version: "2.1.0"
|
||||
sdks:
|
||||
dart: ">=3.10.0 <4.0.0"
|
||||
flutter: ">=3.35.7"
|
||||
flutter: ">=3.35.0"
|
||||
|
||||
@@ -44,7 +44,7 @@ dependencies:
|
||||
#SVG
|
||||
flutter_svg: ^2.2.1
|
||||
cached_network_image: ^3.4.1
|
||||
rive: ^0.13.20
|
||||
|
||||
|
||||
#Shimmer
|
||||
shimmer: ^3.0.0
|
||||
@@ -61,9 +61,8 @@ dependencies:
|
||||
#other
|
||||
permission_handler: ^12.0.1
|
||||
persian_datetime_picker: ^3.2.0
|
||||
encrypt: ^5.0.3
|
||||
collection: ^1.19.1
|
||||
device_preview_plus: ^2.5.1
|
||||
|
||||
|
||||
#L10N tools
|
||||
intl: ^0.20.2
|
||||
|
||||
Reference in New Issue
Block a user