From a03bf32b4efdd2330073719152e99dd06939be75 Mon Sep 17 00:00:00 2001 From: Amos Date: Wed, 15 May 2024 19:31:49 +0800 Subject: [PATCH] Upgrade: Flutter 3.22.0, Packages --- CHANGELOG.md | 4 ++ README.md | 20 +++--- android/app/build.gradle | 69 ++++++++++--------- android/app/src/debug/AndroidManifest.xml | 6 +- android/app/src/main/AndroidManifest.xml | 25 ++++--- android/app/src/profile/AndroidManifest.xml | 6 +- android/build.gradle | 10 +-- android/gradle.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- android/settings.gradle | 11 ++- ios/Podfile.lock | 8 +-- lib/main.dart | 2 + .../multiple_themes_mode/theme_cyan.dart | 8 +-- .../multiple_themes_mode/theme_default.dart | 8 +-- .../multiple_themes_mode/theme_green.dart | 8 +-- .../multiple_themes_mode/theme_orange.dart | 8 +-- .../multiple_themes_mode/theme_purple.dart | 8 +-- .../multiple_themes_mode/theme_red.dart | 8 +-- .../multiple_themes_mode/theme_yellow.dart | 8 +-- lib/views/home/index.dart | 11 ++- .../menu_screen/widgets/setting_database.dart | 5 +- lib/views/onboarding/index.dart | 12 ++-- pubspec.lock | 65 ++++++++--------- pubspec.yaml | 12 ++-- 24 files changed, 168 insertions(+), 158 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index eff195c..a2fb19a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# 1.9.10 +- [升级] Flutter 3.22.0 +- [升级] Package 升级及适配 + # 1.9.9 - [升级] Flutter 3.19.6 - [升级] Package 升级及适配 diff --git a/README.md b/README.md index b88bb7d..3c6989e 100644 --- a/README.md +++ b/README.md @@ -12,9 +12,9 @@

- Mood-Example v1.9.9 - Flutter v3.19.6 - Dart v3.3.4 + Mood-Example v1.9.10 + Flutter v3.22.0 + Dart v3.4.0 BSD-3-Clause License

@@ -100,27 +100,27 @@ Windows: ``` -[√] Flutter (Channel stable, 3.19.6, on Microsoft Windows [版本 10.0.22621.3007], locale zh-CN) +[√] Flutter (Channel stable, 3.22.0, on Microsoft Windows [版本 10.0.22621.3007], locale zh-CN) [√] Android toolchain - develop for Android devices (Android SDK version 34.0.0) [√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.9.6) [√] Android Studio (version 2023.3) [√] IntelliJ IDEA Ultimate Edition (version 2024.1) -[√] VS Code (version 1.89.0) +[√] VS Code (version 1.89.1) ``` macOS: ``` -[✓] Flutter (Channel stable, 3.19.6, on macOS 14.4.1 23E224 darwin-x64, locale zh-Hans-CN) +[✓] Flutter (Channel stable, 3.22.0, on macOS 14.4.1 23E224 darwin-x64, locale zh-Hans-CN) [✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0) -[✓] Xcode - develop for iOS and macOS (Xcode 15.3) -[✓] Android Studio (version 2023.2) -[✓] VS Code (version 1.88.1) +[✓] Xcode - develop for iOS and macOS (Xcode 15.4) +[✓] Android Studio (version 2023.3) +[✓] VS Code (version 1.89.1) ``` ### 🛠️ i18n l10n -官方国际化教程:[中文站](https://flutter.cn/docs/ui/accessibility-and-internationalization/internationalization) | [英文站](https://docs.flutter.dev/ui/accessibility-and-internationalization/internationalization) +官方国际化教程:[中文站](https://docs.flutter.cn/ui/accessibility-and-internationalization/internationalization) | [英文站](https://docs.flutter.dev/ui/accessibility-and-internationalization/internationalization) ```sh ├── lib/ diff --git a/android/app/build.gradle b/android/app/build.gradle index 467ef6e..91c1a08 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -1,63 +1,64 @@ plugins { id "com.android.application" id "kotlin-android" + // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins. id "dev.flutter.flutter-gradle-plugin" } def localProperties = new Properties() -def localPropertiesFile = rootProject.file('local.properties') +def localPropertiesFile = rootProject.file("local.properties") if (localPropertiesFile.exists()) { - localPropertiesFile.withReader('UTF-8') { reader -> + localPropertiesFile.withReader("UTF-8") { reader -> localProperties.load(reader) } } -def flutterVersionCode = localProperties.getProperty('flutter.versionCode') +def flutterVersionCode = localProperties.getProperty("flutter.versionCode") if (flutterVersionCode == null) { - flutterVersionCode = '1' + flutterVersionCode = "1" } -def flutterVersionName = localProperties.getProperty('flutter.versionName') +def flutterVersionName = localProperties.getProperty("flutter.versionName") if (flutterVersionName == null) { - flutterVersionName = '1.0' + flutterVersionName = "1.0" } android { - namespace "com.example.moodexample" - compileSdk flutter.compileSdkVersion - ndkVersion flutter.ndkVersion + namespace = "com.example.moodexample" + compileSdk = flutter.compileSdkVersion + ndkVersion = flutter.ndkVersion compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 } kotlinOptions { - jvmTarget = '1.8' + jvmTarget = "1.8" } sourceSets { - main.java.srcDirs += 'src/main/kotlin' + main.java.srcDirs += "src/main/kotlin" } defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "com.example.moodexample" + applicationId = "com.example.moodexample" // You can update the following values to match your application needs. // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. - minSdkVersion 21 - targetSdkVersion 33 - versionCode flutterVersionCode.toInteger() - versionName flutterVersionName + minSdkVersion = 21 + targetSdkVersion = 34 + versionCode = flutterVersionCode.toInteger() + versionName = flutterVersionName ndk { - abiFilters 'x86','x86_64','armeabi-v7a','arm64-v8a' // 不支持armeabi + abiFilters "x86","x86_64","armeabi-v7a","arm64-v8a" // 不支持armeabi } } buildTypes { release { minifyEnabled true - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro', 'proguard.cfg' + proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro", "proguard.cfg" // TODO: Add your own signing config for the release build. // Signing with the debug keys for now, so `flutter run --release` works. signingConfig signingConfigs.debug @@ -65,8 +66,8 @@ android { } aaptOptions { - additionalParameters '--auto-add-overlay' - //noCompress 'foo', 'bar' + additionalParameters "--auto-add-overlay" + // noCompress "foo", "bar" ignoreAssetsPattern "!.svn:!.git:.*:!CVS:!thumbs.db:!picasa.ini:!*.scc:*~" } @@ -80,25 +81,25 @@ android { } flutter { - source '../..' + source "../.." } repositories { flatDir { - dirs 'libs' + dirs "libs" } } dependencies { // libs UniMPSDK - implementation fileTree(include: ['*.jar'], dir: 'libs') - implementation fileTree(include: ['*.aar'], dir: 'libs') - implementation 'androidx.recyclerview:recyclerview:1.0.0' - implementation 'androidx.legacy:legacy-support-v4:1.0.0' - implementation 'androidx.appcompat:appcompat:1.0.0' - implementation 'com.alibaba:fastjson:1.2.83' - implementation 'com.facebook.fresco:fresco:2.5.0' - implementation 'com.facebook.fresco:animated-gif:2.5.0' - implementation 'com.github.bumptech.glide:glide:4.9.0' - implementation 'androidx.webkit:webkit:1.3.0' + implementation fileTree(include: ["*.jar"], dir: "libs") + implementation fileTree(include: ["*.aar"], dir: "libs") + implementation "androidx.recyclerview:recyclerview:1.0.0" + implementation "androidx.legacy:legacy-support-v4:1.0.0" + implementation "androidx.appcompat:appcompat:1.0.0" + implementation "com.alibaba:fastjson:1.2.83" + implementation "com.facebook.fresco:fresco:2.5.0" + implementation "com.facebook.fresco:animated-gif:2.5.0" + implementation "com.github.bumptech.glide:glide:4.9.0" + implementation "androidx.webkit:webkit:1.3.0" } diff --git a/android/app/src/debug/AndroidManifest.xml b/android/app/src/debug/AndroidManifest.xml index b8df3cd..399f698 100644 --- a/android/app/src/debug/AndroidManifest.xml +++ b/android/app/src/debug/AndroidManifest.xml @@ -1,6 +1,6 @@ - - diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index fc271d3..0936ccf 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -1,5 +1,4 @@ - + @@ -17,11 +16,13 @@ - - @@ -54,4 +46,15 @@ android:name="flutterEmbedding" android:value="2" /> + + + + + + + diff --git a/android/app/src/profile/AndroidManifest.xml b/android/app/src/profile/AndroidManifest.xml index b8df3cd..399f698 100644 --- a/android/app/src/profile/AndroidManifest.xml +++ b/android/app/src/profile/AndroidManifest.xml @@ -1,6 +1,6 @@ - - diff --git a/android/build.gradle b/android/build.gradle index 48191f6..081d241 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -2,15 +2,17 @@ allprojects { repositories { // google() // jcenter() - maven{ url 'https://maven.aliyun.com/repository/public' } - maven{ url 'https://maven.aliyun.com/repository/google' } + maven{ url "https://maven.aliyun.com/repository/public" } + maven{ url "https://maven.aliyun.com/repository/google" } } } -rootProject.buildDir = '../build' +rootProject.buildDir = "../build" subprojects { project.buildDir = "${rootProject.buildDir}/${project.name}" - project.evaluationDependsOn(':app') +} +subprojects { + project.evaluationDependsOn(":app") } tasks.register("clean", Delete) { diff --git a/android/gradle.properties b/android/gradle.properties index 94adc3a..3b5b324 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -1,3 +1,3 @@ -org.gradle.jvmargs=-Xmx1536M +org.gradle.jvmargs=-Xmx4G -XX:+HeapDumpOnOutOfMemoryError android.useAndroidX=true android.enableJetifier=true diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties index 3c472b9..e1ca574 100644 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-all.zip diff --git a/android/settings.gradle b/android/settings.gradle index 3e0e70f..3b11d24 100644 --- a/android/settings.gradle +++ b/android/settings.gradle @@ -5,18 +5,17 @@ pluginManagement { def flutterSdkPath = properties.getProperty("flutter.sdk") assert flutterSdkPath != null, "flutter.sdk not set in local.properties" return flutterSdkPath - } - settings.ext.flutterSdkPath = flutterSdkPath() + }() - includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle") + includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") repositories { // google() // mavenCentral() // gradlePluginPortal() - maven{ url 'https://maven.aliyun.com/repository/public' } - maven{ url 'https://maven.aliyun.com/repository/google' } - maven{ url 'https://maven.aliyun.com/repository/gradle-plugin' } + maven{ url "https://maven.aliyun.com/repository/public" } + maven{ url "https://maven.aliyun.com/repository/google" } + maven{ url "https://maven.aliyun.com/repository/gradle-plugin" } } } diff --git a/ios/Podfile.lock b/ios/Podfile.lock index e0a0255..189dce7 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -143,14 +143,14 @@ SPEC CHECKSUMS: file_picker: 09aa5ec1ab24135ccd7a1621c46c84134bfd6655 Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7 flutter_timezone: ffb07bdad3c6276af8dada0f11978d8a1f8a20bb - integration_test: 13825b8a9334a850581300559b8839134b124670 + integration_test: ce0a3ffa1de96d1a89ca0ac26fca7ea18a749ef4 IosAwnCore: b8601fbb37f7b3560f31b84ebf55a72f65812e05 - local_auth_darwin: c7e464000a6a89e952235699e32b329457608d98 - path_provider_foundation: 3784922295ac71e43754bd15e0653ccfd36a147c + local_auth_darwin: 4d56c90c2683319835a61274b57620df9c4520ab + path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46 SDWebImage: 40b0b4053e36c660a764958bff99eed16610acbb sensors_plus: 18a9b346c43e157da17d2c8e99def703f9efb9d8 share_plus: 8875f4f2500512ea181eef553c3e27dba5135aad - shared_preferences_foundation: b4c3b4cddf1c21f02770737f147a3f5da9d39695 + shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78 sqflite: 673a0e54cc04b7d6dba8d24fb8095b31c3a99eec SwiftyGif: 706c60cf65fa2bc5ee0313beece843c8eb8194d4 webview_flutter_wkwebview: be0f0d33777f1bfd0c9fdcb594786704dbf65f36 diff --git a/lib/main.dart b/lib/main.dart index 97b5aec..bb29e24 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -6,6 +6,8 @@ import 'package:moodexample/common/notification.dart'; import 'application.dart'; void main() { + WidgetsFlutterBinding.ensureInitialized(); + // shared_preferences 模拟器需要使用(防止异常) // SharedPreferences.setMockInitialValues({}); 该操作会清空所有SharedPreferences值 diff --git a/lib/themes/multiple_themes_mode/theme_cyan.dart b/lib/themes/multiple_themes_mode/theme_cyan.dart index 921b0e1..820605d 100644 --- a/lib/themes/multiple_themes_mode/theme_cyan.dart +++ b/lib/themes/multiple_themes_mode/theme_cyan.dart @@ -61,8 +61,8 @@ class AppThemeCyan { const BottomSheetThemeData(modalBackgroundColor: Color(0xFFF6F8FA)), // Radio radioTheme: RadioThemeData( - fillColor: MaterialStateProperty.all(const Color(0xFF111315)), - overlayColor: MaterialStateProperty.all(const Color(0xFF111315)), + fillColor: WidgetStateProperty.all(const Color(0xFF111315)), + overlayColor: WidgetStateProperty.all(const Color(0xFF111315)), ), ); @@ -121,8 +121,8 @@ class AppThemeCyan { const BottomSheetThemeData(modalBackgroundColor: Color(0xFF111315)), // Radio radioTheme: RadioThemeData( - fillColor: MaterialStateProperty.all(const Color(0xFFEFEFEF)), - overlayColor: MaterialStateProperty.all(const Color(0xFFEFEFEF)), + fillColor: WidgetStateProperty.all(const Color(0xFFEFEFEF)), + overlayColor: WidgetStateProperty.all(const Color(0xFFEFEFEF)), ), ); } diff --git a/lib/themes/multiple_themes_mode/theme_default.dart b/lib/themes/multiple_themes_mode/theme_default.dart index 07c2979..984ed2f 100644 --- a/lib/themes/multiple_themes_mode/theme_default.dart +++ b/lib/themes/multiple_themes_mode/theme_default.dart @@ -69,8 +69,8 @@ class AppThemeDefault { const BottomSheetThemeData(modalBackgroundColor: Color(0xFFF6F8FA)), // Radio radioTheme: RadioThemeData( - fillColor: MaterialStateProperty.all(const Color(0xFF111315)), - overlayColor: MaterialStateProperty.all(const Color(0xFF111315)), + fillColor: WidgetStateProperty.all(const Color(0xFF111315)), + overlayColor: WidgetStateProperty.all(const Color(0xFF111315)), ), ); @@ -129,8 +129,8 @@ class AppThemeDefault { const BottomSheetThemeData(modalBackgroundColor: Color(0xFF111315)), // Radio radioTheme: RadioThemeData( - fillColor: MaterialStateProperty.all(const Color(0xFFEFEFEF)), - overlayColor: MaterialStateProperty.all(const Color(0xFFEFEFEF)), + fillColor: WidgetStateProperty.all(const Color(0xFFEFEFEF)), + overlayColor: WidgetStateProperty.all(const Color(0xFFEFEFEF)), ), ); } diff --git a/lib/themes/multiple_themes_mode/theme_green.dart b/lib/themes/multiple_themes_mode/theme_green.dart index 16878ea..626fd7c 100644 --- a/lib/themes/multiple_themes_mode/theme_green.dart +++ b/lib/themes/multiple_themes_mode/theme_green.dart @@ -61,8 +61,8 @@ class AppThemeGreen { const BottomSheetThemeData(modalBackgroundColor: Color(0xFFF6F8FA)), // Radio radioTheme: RadioThemeData( - fillColor: MaterialStateProperty.all(const Color(0xFF111315)), - overlayColor: MaterialStateProperty.all(const Color(0xFF111315)), + fillColor: WidgetStateProperty.all(const Color(0xFF111315)), + overlayColor: WidgetStateProperty.all(const Color(0xFF111315)), ), ); @@ -121,8 +121,8 @@ class AppThemeGreen { const BottomSheetThemeData(modalBackgroundColor: Color(0xFF111315)), // Radio radioTheme: RadioThemeData( - fillColor: MaterialStateProperty.all(const Color(0xFFEFEFEF)), - overlayColor: MaterialStateProperty.all(const Color(0xFFEFEFEF)), + fillColor: WidgetStateProperty.all(const Color(0xFFEFEFEF)), + overlayColor: WidgetStateProperty.all(const Color(0xFFEFEFEF)), ), ); } diff --git a/lib/themes/multiple_themes_mode/theme_orange.dart b/lib/themes/multiple_themes_mode/theme_orange.dart index db32e24..23c85d7 100644 --- a/lib/themes/multiple_themes_mode/theme_orange.dart +++ b/lib/themes/multiple_themes_mode/theme_orange.dart @@ -61,8 +61,8 @@ class AppThemeOrange { const BottomSheetThemeData(modalBackgroundColor: Color(0xFFF6F8FA)), // Radio radioTheme: RadioThemeData( - fillColor: MaterialStateProperty.all(const Color(0xFF111315)), - overlayColor: MaterialStateProperty.all(const Color(0xFF111315)), + fillColor: WidgetStateProperty.all(const Color(0xFF111315)), + overlayColor: WidgetStateProperty.all(const Color(0xFF111315)), ), ); @@ -121,8 +121,8 @@ class AppThemeOrange { const BottomSheetThemeData(modalBackgroundColor: Color(0xFF111315)), // Radio radioTheme: RadioThemeData( - fillColor: MaterialStateProperty.all(const Color(0xFFEFEFEF)), - overlayColor: MaterialStateProperty.all(const Color(0xFFEFEFEF)), + fillColor: WidgetStateProperty.all(const Color(0xFFEFEFEF)), + overlayColor: WidgetStateProperty.all(const Color(0xFFEFEFEF)), ), ); } diff --git a/lib/themes/multiple_themes_mode/theme_purple.dart b/lib/themes/multiple_themes_mode/theme_purple.dart index 4aa7075..a964c44 100644 --- a/lib/themes/multiple_themes_mode/theme_purple.dart +++ b/lib/themes/multiple_themes_mode/theme_purple.dart @@ -69,8 +69,8 @@ class AppThemePurple { const BottomSheetThemeData(modalBackgroundColor: Color(0xFFF6F8FA)), // Radio radioTheme: RadioThemeData( - fillColor: MaterialStateProperty.all(const Color(0xFF111315)), - overlayColor: MaterialStateProperty.all(const Color(0xFF111315)), + fillColor: WidgetStateProperty.all(const Color(0xFF111315)), + overlayColor: WidgetStateProperty.all(const Color(0xFF111315)), ), ); @@ -129,8 +129,8 @@ class AppThemePurple { const BottomSheetThemeData(modalBackgroundColor: Color(0xFF111315)), // Radio radioTheme: RadioThemeData( - fillColor: MaterialStateProperty.all(const Color(0xFFEFEFEF)), - overlayColor: MaterialStateProperty.all(const Color(0xFFEFEFEF)), + fillColor: WidgetStateProperty.all(const Color(0xFFEFEFEF)), + overlayColor: WidgetStateProperty.all(const Color(0xFFEFEFEF)), ), ); } diff --git a/lib/themes/multiple_themes_mode/theme_red.dart b/lib/themes/multiple_themes_mode/theme_red.dart index 9445140..322db50 100644 --- a/lib/themes/multiple_themes_mode/theme_red.dart +++ b/lib/themes/multiple_themes_mode/theme_red.dart @@ -61,8 +61,8 @@ class AppThemeRed { const BottomSheetThemeData(modalBackgroundColor: Color(0xFFF6F8FA)), // Radio radioTheme: RadioThemeData( - fillColor: MaterialStateProperty.all(const Color(0xFF111315)), - overlayColor: MaterialStateProperty.all(const Color(0xFF111315)), + fillColor: WidgetStateProperty.all(const Color(0xFF111315)), + overlayColor: WidgetStateProperty.all(const Color(0xFF111315)), ), ); @@ -121,8 +121,8 @@ class AppThemeRed { const BottomSheetThemeData(modalBackgroundColor: Color(0xFF111315)), // Radio radioTheme: RadioThemeData( - fillColor: MaterialStateProperty.all(const Color(0xFFEFEFEF)), - overlayColor: MaterialStateProperty.all(const Color(0xFFEFEFEF)), + fillColor: WidgetStateProperty.all(const Color(0xFFEFEFEF)), + overlayColor: WidgetStateProperty.all(const Color(0xFFEFEFEF)), ), ); } diff --git a/lib/themes/multiple_themes_mode/theme_yellow.dart b/lib/themes/multiple_themes_mode/theme_yellow.dart index c020647..b93720b 100644 --- a/lib/themes/multiple_themes_mode/theme_yellow.dart +++ b/lib/themes/multiple_themes_mode/theme_yellow.dart @@ -69,8 +69,8 @@ class AppThemeYellow { const BottomSheetThemeData(modalBackgroundColor: Color(0xFFF6F8FA)), // Radio radioTheme: RadioThemeData( - fillColor: MaterialStateProperty.all(const Color(0xFF111315)), - overlayColor: MaterialStateProperty.all(const Color(0xFF111315)), + fillColor: WidgetStateProperty.all(const Color(0xFF111315)), + overlayColor: WidgetStateProperty.all(const Color(0xFF111315)), ), ); @@ -129,8 +129,8 @@ class AppThemeYellow { const BottomSheetThemeData(modalBackgroundColor: Color(0xFF111315)), // Radio radioTheme: RadioThemeData( - fillColor: MaterialStateProperty.all(const Color(0xFFEFEFEF)), - overlayColor: MaterialStateProperty.all(const Color(0xFFEFEFEF)), + fillColor: WidgetStateProperty.all(const Color(0xFFEFEFEF)), + overlayColor: WidgetStateProperty.all(const Color(0xFFEFEFEF)), ), ); } diff --git a/lib/views/home/index.dart b/lib/views/home/index.dart index 44a1445..e1f95c7 100644 --- a/lib/views/home/index.dart +++ b/lib/views/home/index.dart @@ -369,21 +369,20 @@ class NoticeCard extends StatelessWidget { child: AnimatedPress( child: OutlinedButton( style: ButtonStyle( - foregroundColor: MaterialStateProperty.all(Colors.white), - backgroundColor: - MaterialStateProperty.all(Colors.black87), - textStyle: MaterialStateProperty.all( + foregroundColor: WidgetStateProperty.all(Colors.white), + backgroundColor: WidgetStateProperty.all(Colors.black87), + textStyle: WidgetStateProperty.all( TextStyle( fontSize: 14.sp, fontWeight: FontWeight.w400, ), ), - shape: MaterialStateProperty.all( + shape: WidgetStateProperty.all( RoundedRectangleBorder( borderRadius: BorderRadius.circular(14.sp), ), ), - overlayColor: MaterialStateProperty.all(Colors.white10), + overlayColor: WidgetStateProperty.all(Colors.white10), ), onPressed: () => { /// 导航到新路由 diff --git a/lib/views/menu_screen/widgets/setting_database.dart b/lib/views/menu_screen/widgets/setting_database.dart index b21806a..7bd37eb 100644 --- a/lib/views/menu_screen/widgets/setting_database.dart +++ b/lib/views/menu_screen/widgets/setting_database.dart @@ -236,7 +236,7 @@ class _ImportDatabaseBodyState extends State { color: Colors.transparent, child: TextButton( style: ButtonStyle( - shape: MaterialStateProperty.all( + shape: WidgetStateProperty.all( const CircleBorder(), ), ), @@ -292,8 +292,7 @@ class _ImportDatabaseBodyState extends State { color: Colors.transparent, child: TextButton( style: ButtonStyle( - shape: - MaterialStateProperty.all(const CircleBorder()), + shape: WidgetStateProperty.all(const CircleBorder()), ), onPressed: () async { final String filePath = diff --git a/lib/views/onboarding/index.dart b/lib/views/onboarding/index.dart index 7754f50..d17308f 100644 --- a/lib/views/onboarding/index.dart +++ b/lib/views/onboarding/index.dart @@ -193,17 +193,17 @@ class _SwiperBodyState extends State with TickerProviderStateMixin { builder: (context, child) => OutlinedButton( key: const Key('widget_next_button'), style: ButtonStyle( - padding: MaterialStateProperty.all(EdgeInsets.all(20.w)), - foregroundColor: MaterialStateProperty.all(Colors.white), - backgroundColor: MaterialStateProperty.all( + padding: WidgetStateProperty.all(EdgeInsets.all(20.w)), + foregroundColor: WidgetStateProperty.all(Colors.white), + backgroundColor: WidgetStateProperty.all( _stepButtonColorAnimation.value, ), - textStyle: MaterialStateProperty.all( + textStyle: WidgetStateProperty.all( TextStyle( fontSize: 240.sp, ), ), - shape: MaterialStateProperty.all( + shape: WidgetStateProperty.all( RoundedRectangleBorder( borderRadius: BorderRadius.circular(50.h), side: const BorderSide( @@ -211,7 +211,7 @@ class _SwiperBodyState extends State with TickerProviderStateMixin { ), ), ), - overlayColor: MaterialStateProperty.all(Colors.white10), + overlayColor: WidgetStateProperty.all(Colors.white10), ), onPressed: () { if (swiperIndex == _swiperList.length - 1) { diff --git a/pubspec.lock b/pubspec.lock index d57e8cd..98270e1 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -181,10 +181,10 @@ packages: dependency: "direct main" description: name: fl_chart - sha256: "2b7c1f5d867da9a054661641c8f499c55c47c39acccb97b3bc673f5fa9a39e74" + sha256: d0f0d49112f2f4b192481c16d05b6418bd7820e021e265a3c22db98acf7ed7fb url: "https://pub.dev" source: hosted - version: "0.67.0" + version: "0.68.0" flame: dependency: "direct main" description: @@ -215,10 +215,10 @@ packages: dependency: "direct dev" description: name: flutter_lints - sha256: "9e8c3858111da373efc5aa341de011d9bd23e2c5c5e0c62bccf32438e192d7b1" + sha256: "3f41d009ba7172d5ff9be5f6e6e6abb4300e263aab8866d2a0842ed2a70f8f0c" url: "https://pub.dev" source: hosted - version: "3.0.2" + version: "4.0.0" flutter_localizations: dependency: "direct main" description: flutter @@ -235,10 +235,11 @@ packages: flutter_screen_lock: dependency: "direct main" description: - name: flutter_screen_lock - sha256: f8e504aa0e5fe61ea13b66692ecdec3e8761118173b51c9b3b5518b8e2911e5b - url: "https://pub.dev" - source: hosted + path: "." + ref: HEAD + resolved-ref: "9df6900d6998ab5f359ed2477197d4a38bc9fc95" + url: "https://github.com/Allenxuxu/flutter_screen_lock" + source: git version: "9.0.2" flutter_screenutil: dependency: "direct main" @@ -344,34 +345,34 @@ packages: dependency: transitive description: name: leak_tracker - sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa" + sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a" url: "https://pub.dev" source: hosted - version: "10.0.0" + version: "10.0.4" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0 + sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8" url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "3.0.3" leak_tracker_testing: dependency: transitive description: name: leak_tracker_testing - sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47 + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "3.0.1" lints: dependency: transitive description: name: lints - sha256: cbf8d4b858bb0134ef3ef87841abdf8d63bfc255c266b7bf6b39daa1085c4290 + sha256: "976c774dd944a42e83e2467f4cc670daef7eed6295b10b36ae8c85bcbf828235" url: "https://pub.dev" source: hosted - version: "3.0.0" + version: "4.0.0" local_auth: dependency: "direct main" description: @@ -392,10 +393,10 @@ packages: dependency: "direct main" description: name: local_auth_darwin - sha256: "33381a15b0de2279523eca694089393bb146baebdce72a404555d03174ebc1e9" + sha256: "959145a4cf6f0de745b9ec9ac60101270eb4c5b8b7c2a0470907014adc1c618d" url: "https://pub.dev" source: hosted - version: "1.2.2" + version: "1.3.0" local_auth_platform_interface: dependency: transitive description: @@ -440,10 +441,10 @@ packages: dependency: transitive description: name: meta - sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 + sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" url: "https://pub.dev" source: hosted - version: "1.11.0" + version: "1.12.0" mime: dependency: transitive description: @@ -496,10 +497,10 @@ packages: dependency: transitive description: name: path_provider_foundation - sha256: "5a7999be66e000916500be4f15a3633ebceb8302719b47b9cc49ce924125350f" + sha256: f234384a3fdd67f989b4d54a5d73ca2a6c422fa55ae694381ae0f4375cd1ea16 url: "https://pub.dev" source: hosted - version: "2.3.2" + version: "2.4.0" path_provider_linux: dependency: transitive description: @@ -552,10 +553,10 @@ packages: dependency: transitive description: name: pointycastle - sha256: "79fbafed02cfdbe85ef3fd06c7f4bc2cbcba0177e61b765264853d4253b21744" + sha256: "4be0097fcf3fd3e8449e53730c631200ebc7b88016acecab2b0da2f0149222fe" url: "https://pub.dev" source: hosted - version: "3.9.0" + version: "3.9.1" process: dependency: transitive description: @@ -632,10 +633,10 @@ packages: dependency: transitive description: name: shared_preferences_foundation - sha256: "7708d83064f38060c7b39db12aefe449cb8cdc031d6062280087bc4cdb988f5c" + sha256: "0a8a893bf4fd1152f93fec03a415d11c27c74454d96e2318a7ac38dd18683ab7" url: "https://pub.dev" source: hosted - version: "2.3.5" + version: "2.4.0" shared_preferences_linux: dependency: transitive description: @@ -781,10 +782,10 @@ packages: dependency: transitive description: name: test_api - sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" + sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" url: "https://pub.dev" source: hosted - version: "0.6.1" + version: "0.7.0" tiledjsonreader: dependency: transitive description: @@ -853,10 +854,10 @@ packages: dependency: transitive description: name: vm_service - sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 + sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec" url: "https://pub.dev" source: hosted - version: "13.0.0" + version: "14.2.1" web: dependency: transitive description: @@ -901,10 +902,10 @@ packages: dependency: transitive description: name: webview_flutter_wkwebview - sha256: f12f8d8a99784b863e8b85e4a9a5e3cf1839d6803d2c0c3e0533a8f3c5a992a7 + sha256: "7affdf9d680c015b11587181171d3cad8093e449db1f7d9f0f08f4f33d24f9a0" url: "https://pub.dev" source: hosted - version: "3.13.0" + version: "3.13.1" win32: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 17a2865..cb48e2c 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: moodexample description: 管理自己的情绪,记录当下所见所想。 publish_to: 'none' -version: 1.9.9+454 +version: 1.9.10+455 environment: sdk: ">=3.3.0 <4.0.0" @@ -12,7 +12,7 @@ dependencies: flutter_localizations: # l10n sdk: flutter intl: ^0.19.0 # i18n/l10n 处理 - path: ^1.8.3 + path: ^1.9.0 path_provider: ^2.1.3 # 路径 flutter_screenutil: ^5.9.0 # UI 自适应工具 provider: ^6.1.2 # 状态管理 @@ -24,7 +24,7 @@ dependencies: table_calendar: ^3.1.1 # 日历 flutter_slidable: ^3.1.0 # 滑动操作项 card_swiper: ^3.0.1 # 轮播 - fl_chart: ^0.67.0 # 图表 + fl_chart: ^0.68.0 # 图表 excel: ^4.0.3 # Excel share_plus: ^9.0.0 # 分享 file_picker: ^8.0.3 # 文件选择 @@ -36,16 +36,16 @@ dependencies: animations: ^2.0.11 # 动画 bonfire: 3.8.5 # 游戏引擎相关 flame: 1.17.0 # 游戏引擎相关 - flutter_screen_lock: ^9.0.2 # 密码锁 + flutter_screen_lock: # ^9.0.2 # 密码锁 + git: https://github.com/Allenxuxu/flutter_screen_lock local_auth: ^2.2.0 # 本地认证 local_auth_android: ^1.0.38 # 本地认证 - local_auth_darwin: ^1.2.2 # 本地认证 + local_auth_darwin: ^1.3.0 # 本地认证 flutter_tilt: ^3.0.1 # 倾斜视差 remixicon: ^1.2.0 # Remixicon # https://dart.dev/tools/pub/dependencies#dependency-overrides dependency_overrides: - intl: ^0.19.0 dev_dependencies: flutter_test: