Преглед на файлове

feat: dart 自动修复错误

BaiLuoYan преди 10 часа
родител
ревизия
af2466e7dd

+ 0 - 1
lib/app/app.dart

@@ -16,7 +16,6 @@ import 'data/sp/ix_sp.dart';
 import 'routes/app_pages.dart';
 import 'package:flutter_screenutil/flutter_screenutil.dart';
 
-import 'widgets/click_opacity.dart';
 import 'widgets/gradient_circle_header.dart';
 import 'widgets/triple_tap_detector.dart';
 

+ 1 - 1
lib/app/extensions/widget_extension.dart

@@ -24,7 +24,7 @@ extension WidgetShadowX on Widget {
         borderRadius: BorderRadius.circular(borderRadius),
         boxShadow: [
           BoxShadow(
-            color: shadowColor.withOpacity(opacity),
+            color: shadowColor.withValues(alpha: opacity),
             blurRadius: blurRadius,
             offset: offset,
           ),

+ 0 - 10
lib/app/modules/about/controllers/about_controller.dart

@@ -9,15 +9,5 @@ class AboutController extends GetxController {
     super.onInit();
   }
 
-  @override
-  void onReady() {
-    super.onReady();
-  }
-
-  @override
-  void onClose() {
-    super.onClose();
-  }
-
   void increment() => count.value++;
 }

+ 0 - 1
lib/app/modules/home/controllers/home_controller.dart

@@ -4,7 +4,6 @@ import 'package:nomo/utils/misc.dart';
 import 'package:pull_to_refresh_flutter3/pull_to_refresh_flutter3.dart';
 import '../../../../utils/system_helper.dart';
 import '../../../controllers/base_core_api.dart';
-import '../../../../utils/awesome_notifications_helper.dart';
 import '../../../../utils/log/logger.dart';
 import '../../../base/base_controller.dart';
 import '../../../constants/enums.dart';

+ 1 - 1
lib/app/modules/home/views/home_view.dart

@@ -416,7 +416,7 @@ class HomeView extends BaseView<HomeController> {
             boxShadow: isLight
                 ? [
                     BoxShadow(
-                      color: Colors.black.withOpacity(0.06),
+                      color: Colors.black.withValues(alpha: 0.06),
                       offset: const Offset(0, 4),
                       blurRadius: 16,
                       spreadRadius: 0,

+ 1 - 1
lib/app/modules/home/widgets/connection_button.dart

@@ -95,7 +95,7 @@ class _ConnectionButtonState extends State<ConnectionButton>
   bool _colorsEqual(List<Color> a, List<Color> b) {
     if (a.length != b.length) return false;
     for (int i = 0; i < a.length; i++) {
-      if (a[i].value != b[i].value) return false;
+      if (a[i].toARGB32() != b[i].toARGB32()) return false;
     }
     return true;
   }

+ 5 - 1
lib/app/modules/home/widgets/lazy_load_indexed_stack.dart

@@ -4,7 +4,11 @@ class LazyLoadIndexedStack extends StatefulWidget {
   final int index;
   final List<WidgetBuilder> children;
 
-  LazyLoadIndexedStack({required this.index, required this.children});
+  const LazyLoadIndexedStack({
+    super.key,
+    required this.index,
+    required this.children,
+  });
 
   @override
   _LazyLoadIndexedStackState createState() => _LazyLoadIndexedStackState();

+ 3 - 2
lib/app/modules/precode/sendemail/views/precode_sendemail_view.dart

@@ -19,7 +19,8 @@ class PrecodeSendemailView extends BaseView<PrecodeSendemailController> {
   const PrecodeSendemailView({super.key});
 
   @override
-  PreferredSizeWidget? get appBar => IXAppBar(title: Strings.sendPreCodeToEmail.tr);
+  PreferredSizeWidget? get appBar =>
+      IXAppBar(title: Strings.sendPreCodeToEmail.tr);
 
   @override
   Widget buildContent(BuildContext context) {
@@ -46,7 +47,7 @@ class PrecodeSendemailView extends BaseView<PrecodeSendemailController> {
               textAlign: TextAlign.center,
               style: TextStyle(
                 fontSize: 14.sp,
-                color: Get.reactiveTheme.hintColor.withOpacity(0.6),
+                color: Get.reactiveTheme.hintColor.withValues(alpha: 0.6),
               ),
             ),
             // 信息卡片列表

+ 1 - 1
lib/app/modules/setting/views/setting_view.dart

@@ -777,7 +777,7 @@ class SettingView extends BaseView<SettingController> {
       padding: EdgeInsets.only(left: 60.w),
       child: Divider(
         height: 1,
-        color: Get.reactiveTheme.dividerColor.withOpacity(0.3),
+        color: Get.reactiveTheme.dividerColor.withValues(alpha: 0.3),
       ),
     );
   }

+ 1 - 1
lib/app/widgets/gradient_circle_header.dart

@@ -575,7 +575,7 @@ class _GradientCircleToCylinderPainter extends CustomPainter {
 
     // 阴影效果
     final Paint shadowPaint = Paint()
-      ..color = Colors.black.withOpacity(0.1)
+      ..color = Colors.black.withValues(alpha: 0.1)
       ..maskFilter = MaskFilter.blur(BlurStyle.normal, 2);
 
     // 第一阶段:圆形逐渐显示(使用裁剪)

+ 18 - 18
lib/config/translations/localization_service.dart

@@ -3,26 +3,26 @@ import 'package:get/get.dart';
 // import 'package:google_fonts/google_fonts.dart';
 
 import '../../app/data/sp/ix_sp.dart';
-import 'ar_AR/ar_ar_translation.dart';
+// import 'ar_AR/ar_ar_translation.dart';
 import 'en_US/en_us_translation.dart';
-import 'es_ES/es_es_translation.dart';
-import 'my_MM/my_mm_translation.dart';
-import 'fa_IR/fa_ir_translation.dart';
-import 'de_DE/de_de_translation.dart';
-import 'ja_JP/ja_jp_translation.dart';
-import 'fr_FR/fr_fr_translation.dart';
-import 'ru_RU/ru_ru_translation.dart';
-import 'ko_KR/ko_kr_translation.dart';
-import 'zh_TW/zh_tw_translation.dart';
+// import 'es_ES/es_es_translation.dart';
+// import 'my_MM/my_mm_translation.dart';
+// import 'fa_IR/fa_ir_translation.dart';
+// import 'de_DE/de_de_translation.dart';
+// import 'ja_JP/ja_jp_translation.dart';
+// import 'fr_FR/fr_fr_translation.dart';
+// import 'ru_RU/ru_ru_translation.dart';
+// import 'ko_KR/ko_kr_translation.dart';
+// import 'zh_TW/zh_tw_translation.dart';
 import 'zh_CN/zh_cn_translation.dart';
-import 'tk_TM/tk_tm_translation.dart';
-import 'pt_BR/pt_br_translation.dart';
-import 'vi_VN/vi_vn_translation.dart';
-import 'id_ID/id_id_translation.dart';
-import 'tl_PH/tl_ph_translation.dart';
-import 'th_TH/th_th_translation.dart';
-import 'hi_IN/hi_in_translation.dart';
-import 'tr_TR/tr_tr_translation.dart';
+// import 'tk_TM/tk_tm_translation.dart';
+// import 'pt_BR/pt_br_translation.dart';
+// import 'vi_VN/vi_vn_translation.dart';
+// import 'id_ID/id_id_translation.dart';
+// import 'tl_PH/tl_ph_translation.dart';
+// import 'th_TH/th_th_translation.dart';
+// import 'hi_IN/hi_in_translation.dart';
+// import 'tr_TR/tr_tr_translation.dart';
 import 'strings_enum.dart';
 
 class LocalizationService extends Translations {

+ 11 - 11
pubspec.lock

@@ -237,10 +237,10 @@ packages:
     dependency: transitive
     description:
       name: characters
-      sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803
+      sha256: faf38497bda5ead2a8c7615f4f7939df04333478bf32e4173fcb06d428b5716b
       url: "https://pub.dev"
     source: hosted
-    version: "1.4.0"
+    version: "1.4.1"
   checked_yaml:
     dependency: transitive
     description:
@@ -940,26 +940,26 @@ packages:
     dependency: transitive
     description:
       name: matcher
-      sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2
+      sha256: dc0b7dc7651697ea4ff3e69ef44b0407ea32c487a39fff6a4004fa585e901861
       url: "https://pub.dev"
     source: hosted
-    version: "0.12.17"
+    version: "0.12.19"
   material_color_utilities:
     dependency: transitive
     description:
       name: material_color_utilities
-      sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec
+      sha256: "9c337007e82b1889149c82ed242ed1cb24a66044e30979c44912381e9be4c48b"
       url: "https://pub.dev"
     source: hosted
-    version: "0.11.1"
+    version: "0.13.0"
   meta:
     dependency: transitive
     description:
       name: meta
-      sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c
+      sha256: "1741988757a65eb6b36abe716829688cf01910bbf91c34354ff7ec1c3de2b349"
       url: "https://pub.dev"
     source: hosted
-    version: "1.16.0"
+    version: "1.18.0"
   mime:
     dependency: transitive
     description:
@@ -1505,10 +1505,10 @@ packages:
     dependency: transitive
     description:
       name: test_api
-      sha256: "522f00f556e73044315fa4585ec3270f1808a4b186c936e612cab0b565ff1e00"
+      sha256: "949a932224383300f01be9221c39180316445ecb8e7547f70a41a35bf421fb9e"
       url: "https://pub.dev"
     source: hosted
-    version: "0.7.6"
+    version: "0.7.11"
   timing:
     dependency: transitive
     description:
@@ -1774,5 +1774,5 @@ packages:
     source: hosted
     version: "3.1.3"
 sdks:
-  dart: ">=3.9.2 <4.0.0"
+  dart: ">=3.10.0-0 <4.0.0"
   flutter: ">=3.35.0"