diff --git a/android/app/build.gradle b/android/app/build.gradle index 21d974e..cfedb1c 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -60,7 +60,7 @@ android { applicationId "com.guozhigq.vvex" // You can update the following values to match your application needs. // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration. - minSdkVersion 19 + minSdkVersion flutter.minSdkVersion targetSdkVersion 33 versionCode flutterVersionCode.toInteger() versionName flutterVersionName diff --git a/android/build.gradle b/android/build.gradle index 40c6677..36cfeaf 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,10 +1,17 @@ buildscript { - ext.kotlin_version = '1.7.22' + ext.kotlin_version = '2.0.10' repositories { google() mavenCentral() } + configurations.all { + resolutionStrategy { + force 'androidx.core:core-ktx:1.6.0' + } + } + + dependencies { classpath 'com.android.tools.build:gradle:7.2.2' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" @@ -30,6 +37,17 @@ rootProject.buildDir = '../build' subprojects { project.buildDir = "${rootProject.buildDir}/${project.name}" } +subprojects { + afterEvaluate { project -> + if (project.plugins.hasPlugin("com.android.application") || + project.plugins.hasPlugin("com.android.library")) { + project.android { + compileSdkVersion 34 + buildToolsVersion "34.0.0" + } + } + } +} subprojects { project.evaluationDependsOn(':app') } diff --git a/ios/Podfile.lock b/ios/Podfile.lock index d7d211e..e3f7dc3 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -103,7 +103,7 @@ SPEC CHECKSUMS: device_info_plus: 97af1d7e84681a90d0693e63169a5d50e0839a0d Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7 flutter_inappwebview: acd4fc0f012cefd09015000c241137d82f01ba62 - flutter_local_notifications: 0c0b1ae97e741e1521e4c1629a459d04b9aec743 + flutter_local_notifications: 4cde75091f6327eb8517fa068a0a5950212d2086 image_gallery_saver: cb43cc43141711190510e92c460eb1655cd343cb OrderedSet: aaeb196f7fef5a9edf55d89760da9176ad40b93c path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46 diff --git a/lib/service/local_notice.dart b/lib/service/local_notice.dart index dc50296..1f8579f 100644 --- a/lib/service/local_notice.dart +++ b/lib/service/local_notice.dart @@ -148,7 +148,7 @@ class LocalNoticeService { final AndroidFlutterLocalNotificationsPlugin? androidImplementation = _localNotificationsPlugin.resolvePlatformSpecificImplementation< AndroidFlutterLocalNotificationsPlugin>(); - await androidImplementation?.requestPermission(); + await androidImplementation?.requestNotificationsPermission(); } } diff --git a/pubspec.lock b/pubspec.lock index 7b278e9..fa6fdec 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -495,26 +495,26 @@ packages: dependency: "direct main" description: name: flutter_local_notifications - sha256: "293995f94e120c8afce768981bd1fa9c5d6de67c547568e3b42ae2defdcbb4a0" + sha256: "674173fd3c9eda9d4c8528da2ce0ea69f161577495a9cc835a2a4ecd7eadeb35" url: "https://pub.flutter-io.cn" source: hosted - version: "13.0.0" + version: "17.2.4" flutter_local_notifications_linux: dependency: transitive description: name: flutter_local_notifications_linux - sha256: ccb08b93703aeedb58856e5637450bf3ffec899adb66dc325630b68994734b89 + sha256: c49bd06165cad9beeb79090b18cd1eb0296f4bf4b23b84426e37dd7c027fc3af url: "https://pub.flutter-io.cn" source: hosted - version: "3.0.0+1" + version: "4.0.1" flutter_local_notifications_platform_interface: dependency: transitive description: name: flutter_local_notifications_platform_interface - sha256: "5ec1feac5f7f7d9266759488bc5f76416152baba9aa1b26fe572246caa00d1ab" + sha256: "85f8d07fe708c1bdcf45037f2c0109753b26ae077e9d9e899d55971711a4ea66" url: "https://pub.flutter-io.cn" source: hosted - version: "6.0.0" + version: "7.2.0" flutter_localizations: dependency: "direct main" description: flutter diff --git a/pubspec.yaml b/pubspec.yaml index a02241c..96ef101 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -91,7 +91,7 @@ dependencies: # 桌面长按菜单 quick_actions: ^1.0.1 # 通知 - flutter_local_notifications: ^13.0.0 + flutter_local_notifications: ^17.2.1+2 # 时区 timezone: ^0.9.1 # 代理