From 5c56c88ec4d49e20accf69c9a85177afbc413d20 Mon Sep 17 00:00:00 2001 From: amirrezaghabeli Date: Sun, 3 Aug 2025 11:11:28 +0330 Subject: [PATCH] some fixes in files --- .fvmrc | 3 - lib/views/login/widget/login_button.dart | 38 ----------- lib/views/login/widget/login_logo.dart | 13 ---- lib/views/login/widget/login_textfield.dart | 75 --------------------- lib/views/login/widget/login_title.dart | 30 --------- pubspec.lock | 74 +++++++++++++++++--- 6 files changed, 65 insertions(+), 168 deletions(-) delete mode 100644 .fvmrc delete mode 100644 lib/views/login/widget/login_button.dart delete mode 100644 lib/views/login/widget/login_logo.dart delete mode 100644 lib/views/login/widget/login_textfield.dart delete mode 100644 lib/views/login/widget/login_title.dart diff --git a/.fvmrc b/.fvmrc deleted file mode 100644 index b987073..0000000 --- a/.fvmrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "flutter": "3.29.3" -} \ No newline at end of file diff --git a/lib/views/login/widget/login_button.dart b/lib/views/login/widget/login_button.dart deleted file mode 100644 index c8da53d..0000000 --- a/lib/views/login/widget/login_button.dart +++ /dev/null @@ -1,38 +0,0 @@ -import 'package:flutter/material.dart'; - -import '../../../core/constants/colors.dart'; -import '../../../core/constants/strings.dart'; -import '../../../core/utils/size_config.dart'; - -class LoginButton extends StatelessWidget { - final bool isEnabled; - final VoidCallback? onPressed; - - const LoginButton({ - super.key, - required this.isEnabled, - required this.onPressed, - }); - - @override - Widget build(BuildContext context) { - return SizedBox( - width: double.infinity, - height: 55.0.h(), - child: ElevatedButton( - onPressed: onPressed, - style: ElevatedButton.styleFrom( - backgroundColor: isEnabled ? AppColors.mainBlue : Colors.grey[300], - foregroundColor: Colors.white, - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(28.0.w()), - ), - ), - child: Text( - AppStrings.loginButton, - style: TextStyle(fontSize: 16.0.sp(), fontWeight: FontWeight.bold), - ), - ), - ); - } -} diff --git a/lib/views/login/widget/login_logo.dart b/lib/views/login/widget/login_logo.dart deleted file mode 100644 index bfeecd5..0000000 --- a/lib/views/login/widget/login_logo.dart +++ /dev/null @@ -1,13 +0,0 @@ -import 'package:flutter/material.dart'; - -import '../../../core/constants/assets.dart'; -import '../../../core/utils/size_config.dart'; - -class LoginLogo extends StatelessWidget { - const LoginLogo({super.key}); - - @override - Widget build(BuildContext context) { - return Image.asset(AssetsManager.logo, width: 190.0.w(), height: 88.0.h()); - } -} diff --git a/lib/views/login/widget/login_textfield.dart b/lib/views/login/widget/login_textfield.dart deleted file mode 100644 index 4bc6f04..0000000 --- a/lib/views/login/widget/login_textfield.dart +++ /dev/null @@ -1,75 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter_svg/svg.dart'; - -import '../../../core/constants/assets.dart'; -import '../../../core/constants/colors.dart'; -import '../../../core/utils/size_config.dart'; - -class LoginTextField extends StatelessWidget { - final TextEditingController controller; - final FocusNode focusNode; - final String label; - final String iconPath; - final bool isPassword; - final bool obscureText; - final VoidCallback? onToggleVisibility; - - const LoginTextField({ - super.key, - required this.controller, - required this.focusNode, - required this.label, - required this.iconPath, - this.isPassword = false, - this.obscureText = false, - this.onToggleVisibility, - }); - - @override - Widget build(BuildContext context) { - return TextField( - controller: controller, - focusNode: focusNode, - obscureText: isPassword ? obscureText : false, - decoration: InputDecoration( - labelText: label, - prefixIcon: Padding( - padding: EdgeInsets.all(12.0.w()), - child: SvgPicture.asset( - iconPath, - width: 24.0.w(), - height: 24.0.h(), - colorFilter: ColorFilter.mode( - focusNode.hasFocus ? Colors.black87 : Colors.grey, - BlendMode.srcIn, - ), - ), - ), - suffixIcon: - isPassword - ? IconButton( - onPressed: onToggleVisibility, - icon: SvgPicture.asset( - obscureText - ? AssetsManager.passwordVisibility - : AssetsManager.passwordVisibilityOff, - width: 24.0.w(), - height: 24.0.h(), - colorFilter: ColorFilter.mode( - focusNode.hasFocus ? Colors.black87 : Colors.grey, - BlendMode.srcIn, - ), - ), - ) - : null, - border: OutlineInputBorder( - borderRadius: BorderRadius.circular(12.0.w()), - ), - focusedBorder: OutlineInputBorder( - borderSide: BorderSide(color: AppColors.borderBlue), - borderRadius: BorderRadius.circular(12.0.w()), - ), - ), - ); - } -} diff --git a/lib/views/login/widget/login_title.dart b/lib/views/login/widget/login_title.dart deleted file mode 100644 index 174a936..0000000 --- a/lib/views/login/widget/login_title.dart +++ /dev/null @@ -1,30 +0,0 @@ -import 'package:flutter/material.dart'; - -import '../../../core/constants/strings.dart'; -import '../../../core/utils/size_config.dart'; - -class LoginTitle extends StatelessWidget { - const LoginTitle({super.key}); - - @override - Widget build(BuildContext context) { - return Column( - children: [ - Text( - AppStrings.signInTitle, - style: TextStyle(fontSize: 28.0.sp(), fontWeight: FontWeight.w700), - ), - SizedBox(height: 8.0.h()), - Text( - AppStrings.signInSubtitle, - style: TextStyle( - fontSize: 14.0.sp(), - fontWeight: FontWeight.w400, - color: Colors.grey, - ), - textAlign: TextAlign.center, - ), - ], - ); - } -} diff --git a/pubspec.lock b/pubspec.lock index 9bf5be6..0234c13 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -29,10 +29,10 @@ packages: dependency: transitive description: name: async - sha256: d2872f9c19731c2e5f10444b14686eb7cc85c76274bd6c16e1816bff9a3bab63 + sha256: "758e6d74e971c3e5aceb4110bfd6698efc7f501675bcfe0c775459a8140750eb" url: "https://pub.dev" source: hosted - version: "2.12.0" + version: "2.13.0" boolean_selector: dependency: transitive description: @@ -181,10 +181,10 @@ packages: dependency: transitive description: name: fake_async - sha256: "6a95e56b2449df2273fd8c45a662d6947ce1ebb7aafe80e550a3f68297f3cacc" + sha256: "5368f224a74523e8d2e7399ea1638b37aecfca824a3cc4dfdf77bf1fa905ac44" url: "https://pub.dev" source: hosted - version: "1.3.2" + version: "1.3.3" file: dependency: transitive description: @@ -214,6 +214,14 @@ packages: url: "https://pub.dev" source: hosted version: "5.0.0" + flutter_svg: + dependency: "direct main" + description: + name: flutter_svg + sha256: cd57f7969b4679317c17af6fd16ee233c1e60a82ed209d8a475c54fd6fd6f845 + url: "https://pub.dev" + source: hosted + version: "2.2.0" flutter_test: dependency: "direct dev" description: flutter @@ -311,10 +319,10 @@ packages: dependency: transitive description: name: leak_tracker - sha256: c35baad643ba394b40aac41080300150a4f08fd0fd6a10378f8f7c6bc161acec + sha256: "6bb818ecbdffe216e81182c2f0714a2e62b593f4a4f13098713ff1685dfb6ab0" url: "https://pub.dev" source: hosted - version: "10.0.8" + version: "10.0.9" leak_tracker_flutter_testing: dependency: transitive description: @@ -403,6 +411,22 @@ packages: url: "https://pub.dev" source: hosted version: "1.9.1" + path_parsing: + dependency: transitive + description: + name: path_parsing + sha256: "883402936929eac138ee0a45da5b0f2c80f89913e6dc3bf77eb65b84b409c6ca" + url: "https://pub.dev" + source: hosted + version: "1.1.0" + petitparser: + dependency: transitive + description: + name: petitparser + sha256: "07c8f0b1913bcde1ff0d26e57ace2f3012ccbf2b204e070290dad3bb22797646" + url: "https://pub.dev" + source: hosted + version: "6.1.0" pool: dependency: transitive description: @@ -536,6 +560,30 @@ packages: url: "https://pub.dev" source: hosted version: "1.4.0" + vector_graphics: + dependency: transitive + description: + name: vector_graphics + sha256: a4f059dc26fc8295b5921376600a194c4ec7d55e72f2fe4c7d2831e103d461e6 + url: "https://pub.dev" + source: hosted + version: "1.1.19" + vector_graphics_codec: + dependency: transitive + description: + name: vector_graphics_codec + sha256: "99fd9fbd34d9f9a32efd7b6a6aae14125d8237b10403b422a6a6dfeac2806146" + url: "https://pub.dev" + source: hosted + version: "1.1.13" + vector_graphics_compiler: + dependency: transitive + description: + name: vector_graphics_compiler + sha256: "557a315b7d2a6dbb0aaaff84d857967ce6bdc96a63dc6ee2a57ce5a6ee5d3331" + url: "https://pub.dev" + source: hosted + version: "1.1.17" vector_math: dependency: transitive description: @@ -548,10 +596,10 @@ packages: dependency: transitive description: name: vm_service - sha256: "0968250880a6c5fe7edc067ed0a13d4bae1577fe2771dcf3010d52c4a9d3ca14" + sha256: ddfa8d30d89985b96407efce8acbdd124701f96741f2d981ca860662f1c0dc02 url: "https://pub.dev" source: hosted - version: "14.3.1" + version: "15.0.0" watcher: dependency: transitive description: @@ -584,6 +632,14 @@ packages: url: "https://pub.dev" source: hosted version: "3.0.3" + xml: + dependency: transitive + description: + name: xml + sha256: b015a8ad1c488f66851d762d3090a21c600e479dc75e68328c52774040cf9226 + url: "https://pub.dev" + source: hosted + version: "6.5.0" yaml: dependency: transitive description: @@ -594,4 +650,4 @@ packages: version: "3.1.3" sdks: dart: ">=3.7.2 <4.0.0" - flutter: ">=3.18.0-18.0.pre.54" + flutter: ">=3.27.0"