提交 7b85d3a7 authored 作者: 王鹏飞's avatar 王鹏飞

chore: 升级 Flutter SDK 3.10.7 → 3.29.3,适配 flutter analyze 自动修复

构建系统变更: - Android: AGP 8.7.0 / Gradle 8.10.2 / Kotlin 1.8.22 / Java 17 / NDK 27.0 - Android: 迁移至 plugins {} DSL,移除 buildscript,适配 namespace - Android: 添加阿里云和腾讯 Maven 镜像,强制 AGP 版本统一 - iOS: 修复 fluwx WeChat SDK 头文件搜索路径及 flutter_sound 模块化标头 - iOS: 添加 use_modular_headers! 解决 Swift pod 静态库集成问题 - 依赖: 升级版本约束,fixed version → caret constraint - 依赖: flutter_sound 9.2.13 → 9.30.0, carousel_slider 4.2.1 → 5.1.2 - 修复: AudioSource 导入路径适配 flutter_sound 9.30.0 dart fix 自动修复: - MaterialStateProperty → WidgetStateProperty(Flutter 3.19+) - ColorScheme.background → surface / onBackground → onSurface(Flutter 3.18+) - 移除多余的 null 断言、null 判断、未使用的 import - 补充缺少的 return null
上级 a29ecb6a
...@@ -44,6 +44,7 @@ app.*.map.json ...@@ -44,6 +44,7 @@ app.*.map.json
/android/app/debug /android/app/debug
/android/app/profile /android/app/profile
/android/app/release /android/app/release
/android/app/.cxx
# fvm # fvm
.fvm/ .fvm/
def localProperties = new Properties() plugins {
def localPropertiesFile = rootProject.file('local.properties') id "com.android.application"
if (localPropertiesFile.exists()) { id "kotlin-android"
localPropertiesFile.withReader('UTF-8') { reader -> id "dev.flutter.flutter-gradle-plugin"
localProperties.load(reader)
}
}
def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
}
def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
} }
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
def keystorePropertiesFile = rootProject.file("key.properties") def keystorePropertiesFile = rootProject.file("key.properties")
def keystoreProperties = new Properties() def keystoreProperties = new Properties()
keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
android { android {
namespace "com.zijin.book.flutter_book" namespace "com.zijin.book.flutter_book"
// compileSdkVersion flutter.compileSdkVersion compileSdk flutter.compileSdkVersion
compileSdkVersion 34 ndkVersion = "27.0.12077973"
ndkVersion flutter.ndkVersion
compileOptions { compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8 sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = "17"
} }
defaultConfig { defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.zijin.book.flutter_book" applicationId "com.zijin.book.flutter_book"
// You can update the following values to match your application needs. minSdkVersion 24
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
minSdkVersion 21
targetSdkVersion flutter.targetSdkVersion targetSdkVersion flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger() versionCode flutter.versionCode
versionName flutterVersionName versionName flutter.versionName
} }
signingConfigs { signingConfigs {
release{ release {
keyAlias keystoreProperties['keyAlias'] keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword'] keyPassword keystoreProperties['keyPassword']
storeFile file(keystoreProperties['storeFile']) storeFile file(keystoreProperties['storeFile'])
storePassword keystoreProperties['storePassword'] storePassword keystoreProperties['storePassword']
} }
// debug 使用默认签名
} }
buildTypes { buildTypes {
...@@ -65,14 +44,11 @@ android { ...@@ -65,14 +44,11 @@ android {
// 使用默认 debug 签名 // 使用默认 debug 签名
} }
release { release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.release signingConfig signingConfigs.release
} }
} }
} }
flutter { flutter {
source '../..' source "../.."
} }
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android">
package="com.zijing.book.flutterBook">
<!-- INTERNET 权限在开发过程中是必需的。具体来说,Flutter 需要它与正在运行的应用程序进行通信,以允许设置断点、提供热重载等功能--> <!-- INTERNET 权限在开发过程中是必需的。具体来说,Flutter 需要它与正在运行的应用程序进行通信,以允许设置断点、提供热重载等功能-->
<uses-permission android:name="android.permission.INTERNET"/> <uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.CAMERA" /> <uses-permission android:name="android.permission.CAMERA" />
......
buildscript {
ext.kotlin_version = '1.7.10'
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.3.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
allprojects { allprojects {
repositories { repositories {
maven { url 'https://maven.aliyun.com/repository/google' }
maven { url 'https://maven.aliyun.com/repository/central' }
maven { url 'https://maven.aliyun.com/repository/public' }
maven { url 'https://mirrors.tencent.com/nexus/repository/maven-public/' }
google() google()
mavenCentral() mavenCentral()
} }
} }
rootProject.buildDir = '../build' rootProject.buildDir = "../build"
subprojects { subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}" project.buildDir = "${rootProject.buildDir}/${project.name}"
} }
subprojects { subprojects {
project.evaluationDependsOn(':app') project.evaluationDependsOn(":app")
}
subprojects { sub ->
if (sub.state.executed) {
if (sub.hasProperty('android') && sub.android.namespace == null) {
sub.android.namespace = sub.group
}
} else {
sub.afterEvaluate { p ->
if (p.hasProperty('android') && p.android.namespace == null) {
p.android.namespace = p.group
}
}
}
} }
tasks.register("clean", Delete) { tasks.register("clean", Delete) {
......
...@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME ...@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip
include ':app' pluginManagement {
def flutterSdkPath = {
def properties = new Properties()
file("local.properties").withInputStream { properties.load(it) }
def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null : "flutter.sdk not set in local.properties"
return flutterSdkPath
}()
def localPropertiesFile = new File(rootProject.projectDir, "local.properties") includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
def properties = new Properties()
assert localPropertiesFile.exists() repositories {
localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } maven { url 'https://maven.aliyun.com/repository/google' }
maven { url 'https://maven.aliyun.com/repository/central' }
maven { url 'https://maven.aliyun.com/repository/public' }
maven { url 'https://mirrors.tencent.com/nexus/repository/maven-public/' }
google()
mavenCentral()
gradlePluginPortal()
}
}
def flutterSdkPath = properties.getProperty("flutter.sdk") plugins {
assert flutterSdkPath != null, "flutter.sdk not set in local.properties" id "dev.flutter.flutter-plugin-loader" version "1.0.0"
apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" id "com.android.application" version "8.7.0" apply false
id "org.jetbrains.kotlin.android" version "1.8.22" apply false
}
include ":app"
gradle.beforeProject { project ->
project.buildscript {
repositories {
maven { url 'https://maven.aliyun.com/repository/google' }
maven { url 'https://maven.aliyun.com/repository/central' }
maven { url 'https://maven.aliyun.com/repository/public' }
maven { url 'https://mirrors.tencent.com/nexus/repository/maven-public/' }
google()
mavenCentral()
}
configurations.all {
resolutionStrategy {
eachDependency { details ->
if (details.requested.group == 'com.android.tools.build' && details.requested.name == 'gradle') {
details.useVersion '8.7.0'
}
}
}
}
}
}
...@@ -21,6 +21,6 @@ ...@@ -21,6 +21,6 @@
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>1.0</string> <string>1.0</string>
<key>MinimumOSVersion</key> <key>MinimumOSVersion</key>
<string>11.0</string> <string>12.0</string>
</dict> </dict>
</plist> </plist>
# Uncomment this line to define a global platform for your project platform :ios, '13.0'
# platform :ios, '11.0'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency. # CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true' ENV['COCOAPODS_DISABLE_STATS'] = 'true'
...@@ -27,6 +26,8 @@ require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelpe ...@@ -27,6 +26,8 @@ require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelpe
flutter_ios_podfile_setup flutter_ios_podfile_setup
use_modular_headers!
target 'Runner' do target 'Runner' do
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
target 'RunnerTests' do target 'RunnerTests' do
...@@ -37,14 +38,32 @@ end ...@@ -37,14 +38,32 @@ end
post_install do |installer| post_install do |installer|
installer.pods_project.targets.each do |target| installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target) flutter_additional_ios_build_settings(target)
target.build_configurations.each do |config|
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [ # Fix WXApi.h not found for fluwx
'$(inherited)', if target.name == 'fluwx'
## dart: PermissionGroup.microphone target.build_configurations.each do |config|
'PERMISSION_MICROPHONE=1', config.build_settings['FRAMEWORK_SEARCH_PATHS'] ||= ['$(inherited)']
'PERMISSION_CAMERA=1', config.build_settings['FRAMEWORK_SEARCH_PATHS'] << '$(BUILT_PRODUCTS_DIR)/WechatOpenSDK-XCFramework'
'PERMISSION_PHOTOS=1', config.build_settings['HEADER_SEARCH_PATHS'] ||= ['$(inherited)']
] config.build_settings['HEADER_SEARCH_PATHS'] << '${PODS_ROOT}/WechatOpenSDK-XCFramework/WechatOpenSDK.xcframework/ios-arm64/WechatOpenSDK.framework/Headers'
end end
end
# Fix flutter_sound modular header issue
if target.name == 'flutter_sound' || target.name == 'flutter_sound_core'
target.build_configurations.each do |config|
config.build_settings['DEFINES_MODULE'] = 'YES'
end
end
target.build_configurations.each do |config|
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [
'$(inherited)',
## dart: PermissionGroup.microphone
'PERMISSION_MICROPHONE=1',
'PERMISSION_CAMERA=1',
'PERMISSION_PHOTOS=1',
]
end
end end
end end
...@@ -14,14 +14,14 @@ PODS: ...@@ -14,14 +14,14 @@ PODS:
- flutter_inappwebview_ios (0.0.1): - flutter_inappwebview_ios (0.0.1):
- Flutter - Flutter
- flutter_inappwebview_ios/Core (= 0.0.1) - flutter_inappwebview_ios/Core (= 0.0.1)
- OrderedSet (~> 5.0) - OrderedSet (~> 6.0.3)
- flutter_inappwebview_ios/Core (0.0.1): - flutter_inappwebview_ios/Core (0.0.1):
- Flutter - Flutter
- OrderedSet (~> 5.0) - OrderedSet (~> 6.0.3)
- flutter_sound (9.2.13): - flutter_sound (9.30.0):
- Flutter - Flutter
- flutter_sound_core (= 9.2.13) - flutter_sound_core (= 9.30.0)
- flutter_sound_core (9.2.13) - flutter_sound_core (9.30.0)
- flutter_tts (0.0.1): - flutter_tts (0.0.1):
- Flutter - Flutter
- fluwx (0.0.1): - fluwx (0.0.1):
...@@ -29,24 +29,25 @@ PODS: ...@@ -29,24 +29,25 @@ PODS:
- fluwx/pay (= 0.0.1) - fluwx/pay (= 0.0.1)
- fluwx/pay (0.0.1): - fluwx/pay (0.0.1):
- Flutter - Flutter
- WechatOpenSDK-XCFramework (~> 2.0.2) - WechatOpenSDK-XCFramework (~> 2.0.4)
- image_picker_ios (0.0.1): - image_picker_ios (0.0.1):
- Flutter - Flutter
- just_audio (0.0.1): - just_audio (0.0.1):
- Flutter - Flutter
- OrderedSet (5.0.0) - FlutterMacOS
- OrderedSet (6.0.3)
- package_info_plus (0.4.5): - package_info_plus (0.4.5):
- Flutter - Flutter
- path_provider_foundation (0.0.1): - path_provider_foundation (0.0.1):
- Flutter - Flutter
- FlutterMacOS - FlutterMacOS
- permission_handler_apple (9.1.1): - permission_handler_apple (9.3.0):
- Flutter - Flutter
- ReachabilitySwift (5.0.0) - ReachabilitySwift (5.2.4)
- shared_preferences_foundation (0.0.1): - shared_preferences_foundation (0.0.1):
- Flutter - Flutter
- FlutterMacOS - FlutterMacOS
- sqflite (0.0.3): - sqflite_darwin (0.0.4):
- Flutter - Flutter
- FlutterMacOS - FlutterMacOS
- tobias (0.0.1): - tobias (0.0.1):
...@@ -54,7 +55,7 @@ PODS: ...@@ -54,7 +55,7 @@ PODS:
- tobias/normal (= 0.0.1) - tobias/normal (= 0.0.1)
- tobias/normal (0.0.1): - tobias/normal (0.0.1):
- Flutter - Flutter
- WechatOpenSDK-XCFramework (2.0.2) - WechatOpenSDK-XCFramework (2.0.5)
DEPENDENCIES: DEPENDENCIES:
- audio_session (from `.symlinks/plugins/audio_session/ios`) - audio_session (from `.symlinks/plugins/audio_session/ios`)
...@@ -68,12 +69,12 @@ DEPENDENCIES: ...@@ -68,12 +69,12 @@ DEPENDENCIES:
- flutter_tts (from `.symlinks/plugins/flutter_tts/ios`) - flutter_tts (from `.symlinks/plugins/flutter_tts/ios`)
- fluwx (from `.symlinks/plugins/fluwx/ios`) - fluwx (from `.symlinks/plugins/fluwx/ios`)
- image_picker_ios (from `.symlinks/plugins/image_picker_ios/ios`) - image_picker_ios (from `.symlinks/plugins/image_picker_ios/ios`)
- just_audio (from `.symlinks/plugins/just_audio/ios`) - just_audio (from `.symlinks/plugins/just_audio/darwin`)
- package_info_plus (from `.symlinks/plugins/package_info_plus/ios`) - package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`) - path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
- permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`) - permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`)
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`) - shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)
- sqflite (from `.symlinks/plugins/sqflite/darwin`) - sqflite_darwin (from `.symlinks/plugins/sqflite_darwin/darwin`)
- tobias (from `.symlinks/plugins/tobias/ios`) - tobias (from `.symlinks/plugins/tobias/ios`)
SPEC REPOS: SPEC REPOS:
...@@ -107,7 +108,7 @@ EXTERNAL SOURCES: ...@@ -107,7 +108,7 @@ EXTERNAL SOURCES:
image_picker_ios: image_picker_ios:
:path: ".symlinks/plugins/image_picker_ios/ios" :path: ".symlinks/plugins/image_picker_ios/ios"
just_audio: just_audio:
:path: ".symlinks/plugins/just_audio/ios" :path: ".symlinks/plugins/just_audio/darwin"
package_info_plus: package_info_plus:
:path: ".symlinks/plugins/package_info_plus/ios" :path: ".symlinks/plugins/package_info_plus/ios"
path_provider_foundation: path_provider_foundation:
...@@ -116,35 +117,35 @@ EXTERNAL SOURCES: ...@@ -116,35 +117,35 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/permission_handler_apple/ios" :path: ".symlinks/plugins/permission_handler_apple/ios"
shared_preferences_foundation: shared_preferences_foundation:
:path: ".symlinks/plugins/shared_preferences_foundation/darwin" :path: ".symlinks/plugins/shared_preferences_foundation/darwin"
sqflite: sqflite_darwin:
:path: ".symlinks/plugins/sqflite/darwin" :path: ".symlinks/plugins/sqflite_darwin/darwin"
tobias: tobias:
:path: ".symlinks/plugins/tobias/ios" :path: ".symlinks/plugins/tobias/ios"
SPEC CHECKSUMS: SPEC CHECKSUMS:
audio_session: 9bdd3bf46960d4322cb8c3cb6138295dcfe84eee audio_session: 9bb7f6c970f21241b19f5a3658097ae459681ba0
connectivity_plus: 481668c94744c30c53b8895afb39159d1e619bdf connectivity_plus: 481668c94744c30c53b8895afb39159d1e619bdf
device_info_plus: 335f3ce08d2e174b9fdc3db3db0f4e3b1f66bd89 device_info_plus: 335f3ce08d2e174b9fdc3db3db0f4e3b1f66bd89
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854 Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
flutter_app_update: 816fdb2e30e4832a7c45e3f108d391c42ef040a9 flutter_app_update: 816fdb2e30e4832a7c45e3f108d391c42ef040a9
flutter_inapp_purchase: 722da12971a50f306f37e62fc1aaf576b1cbecf6 flutter_inapp_purchase: 722da12971a50f306f37e62fc1aaf576b1cbecf6
flutter_inappwebview_ios: 25b61a1b550d1068e4ddaf490fc1d03c2ce6828d flutter_inappwebview_ios: b89ba3482b96fb25e00c967aae065701b66e9b99
flutter_sound: 49be32081884d275fe91d48262f4b1fcd86e10d3 flutter_sound: d95194f6476c9ad211d22b3a414d852c12c7ca44
flutter_sound_core: 26c10e5832e76aaacfae252d8925232281c486ae flutter_sound_core: 7f2626d249d3a57bfa6da892ef7e22d234482c1a
flutter_tts: b88dbc8655d3dc961bc4a796e4e16a4cc1795833 flutter_tts: b88dbc8655d3dc961bc4a796e4e16a4cc1795833
fluwx: 70e62e0330c46b988a1c79ce9731f0d4bc4b26fb fluwx: 49b4472b54762abde51daa0bc348ba05520016ac
image_picker_ios: 85f2b3c9fb98c09d63725c4d12ebd585b56ec35d image_picker_ios: 7fe1ff8e34c1790d6fff70a32484959f563a928a
just_audio: 6c031bb61297cf218b4462be616638e81c058e97 just_audio: 4e391f57b79cad2b0674030a00453ca5ce817eed
OrderedSet: aaeb196f7fef5a9edf55d89760da9176ad40b93c OrderedSet: e539b66b644ff081c73a262d24ad552a69be3a94
package_info_plus: 566e1b7a2f3900e4b0020914ad3fc051dcc95596 package_info_plus: 566e1b7a2f3900e4b0020914ad3fc051dcc95596
path_provider_foundation: 608fcb11be570ce83519b076ab6a1fffe2474f05 path_provider_foundation: 080d55be775b7414fd5a5ef3ac137b97b097e564
permission_handler_apple: 3787117e48f80715ff04a3830ca039283d6a4f29 permission_handler_apple: 4ed2196e43d0651e8ff7ca3483a069d469701f2d
ReachabilitySwift: 985039c6f7b23a1da463388634119492ff86c825 ReachabilitySwift: 32793e867593cfc1177f5d16491e3a197d2fccda
shared_preferences_foundation: 0b09b969fb36da5551c0bc4a2dbd9d0ff9387478 shared_preferences_foundation: 9e1978ff2562383bd5676f64ec4e9aa8fa06a6f7
sqflite: c35dad70033b8862124f8337cc994a809fcd9fa3 sqflite_darwin: 20b2a3a3b70e43edae938624ce550a3cbf66a3d0
tobias: 50b529c2501d277c83fef9976803a001eb58a057 tobias: f9c405df3ded93ad34539200fe3e7779cfb19081
WechatOpenSDK-XCFramework: acdeeda129efbef9532bca8a10c24e1b4b8c7d69 WechatOpenSDK-XCFramework: ff342ae616bb86df3d236aca38059dfd4bc4a949
PODFILE CHECKSUM: 293dca100fbb3eb6a866f640cf85127844630abc PODFILE CHECKSUM: 0aacc79f1960df8adf7daf6d51083f9a8617a20a
COCOAPODS: 1.16.2 COCOAPODS: 1.16.2
...@@ -231,7 +231,7 @@ ...@@ -231,7 +231,7 @@
97C146E61CF9000F007C117D /* Project object */ = { 97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject; isa = PBXProject;
attributes = { attributes = {
LastUpgradeCheck = 1300; LastUpgradeCheck = 1510;
ORGANIZATIONNAME = ""; ORGANIZATIONNAME = "";
TargetAttributes = { TargetAttributes = {
331C80F0294D02FB00263BE5 = { 331C80F0294D02FB00263BE5 = {
...@@ -468,7 +468,7 @@ ...@@ -468,7 +468,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES; GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.0; IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = NO; MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos; SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos; SUPPORTED_PLATFORMS = iphoneos;
...@@ -592,7 +592,7 @@ ...@@ -592,7 +592,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES; GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.0; IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = YES; MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES; ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos; SDKROOT = iphoneos;
...@@ -641,7 +641,7 @@ ...@@ -641,7 +641,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES; GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.0; IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = NO; MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos; SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos; SUPPORTED_PLATFORMS = iphoneos;
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<Scheme <Scheme
LastUpgradeVersion = "1300" LastUpgradeVersion = "1510"
version = "1.3"> version = "1.3">
<BuildAction <BuildAction
parallelizeBuildables = "YES" parallelizeBuildables = "YES"
...@@ -59,6 +59,7 @@ ...@@ -59,6 +59,7 @@
ignoresPersistentStateOnLaunch = "NO" ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES" debugDocumentVersioning = "YES"
debugServiceExtension = "internal" debugServiceExtension = "internal"
enableGPUValidationMode = "1"
allowLocationSimulation = "YES"> allowLocationSimulation = "YES">
<BuildableProductRunnable <BuildableProductRunnable
runnableDebuggingMode = "0"> runnableDebuggingMode = "0">
......
...@@ -34,9 +34,26 @@ ...@@ -34,9 +34,26 @@
<string>zijingbook</string> <string>zijingbook</string>
</array> </array>
</dict> </dict>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLName</key>
<string>weixin</string>
<key>CFBundleURLSchemes</key>
<array>
<string>1111</string>
</array>
</dict>
</array> </array>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>$(FLUTTER_BUILD_NUMBER)</string> <string>$(FLUTTER_BUILD_NUMBER)</string>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>weixin</string>
<string>weixinULAPI</string>
<string>weixinURLParamsAPI</string>
<string>alipays</string>
</array>
<key>LSRequiresIPhoneOS</key> <key>LSRequiresIPhoneOS</key>
<true/> <true/>
<key>NSAppTransportSecurity</key> <key>NSAppTransportSecurity</key>
......
...@@ -3,6 +3,8 @@ ...@@ -3,6 +3,8 @@
<plist version="1.0"> <plist version="1.0">
<dict> <dict>
<key>com.apple.developer.associated-domains</key> <key>com.apple.developer.associated-domains</key>
<array/> <array>
<string>applinks:testdomain.com</string>
</array>
</dict> </dict>
</plist> </plist>
...@@ -141,7 +141,7 @@ class OrderListModel { ...@@ -141,7 +141,7 @@ class OrderListModel {
totalPrice: totalPrice ?? this.totalPrice, totalPrice: totalPrice ?? this.totalPrice,
finalTotalPrice: finalTotalPrice ?? this.finalTotalPrice, finalTotalPrice: finalTotalPrice ?? this.finalTotalPrice,
status: status ?? this.status, status: status ?? this.status,
num_: num_ ?? this.num_, num_: num_ ?? num_,
payType: payType ?? this.payType, payType: payType ?? this.payType,
types: types ?? this.types, types: types ?? this.types,
createTime: createTime ?? this.createTime, createTime: createTime ?? this.createTime,
......
...@@ -61,7 +61,7 @@ class BookDetailController extends GetxController with GetSingleTickerProviderSt ...@@ -61,7 +61,7 @@ class BookDetailController extends GetxController with GetSingleTickerProviderSt
ChapterModel? tModel = findChapterById(chapters, currentChapterId); ChapterModel? tModel = findChapterById(chapters, currentChapterId);
if(tModel != null){ if(tModel != null){
updateParentsStatus(chapters, tModel!); updateParentsStatus(chapters, tModel);
} }
} }
......
...@@ -276,7 +276,7 @@ class _BookDetailPageState extends State<BookDetailPage> with SingleTickerProvid ...@@ -276,7 +276,7 @@ class _BookDetailPageState extends State<BookDetailPage> with SingleTickerProvid
final PopBackModel? backModel = await context.pushNamed(Routes.web,queryParameters: {'book_id': controller.bookDetails.bookId.toString(),'chapter_id': chapterId,'chapter_name':chapterName,'note_id':'0'},extra: controller.bookDetails); final PopBackModel? backModel = await context.pushNamed(Routes.web,queryParameters: {'book_id': controller.bookDetails.bookId.toString(),'chapter_id': chapterId,'chapter_name':chapterName,'note_id':'0'},extra: controller.bookDetails);
if (backModel!.back == true){ if (backModel!.back == true){
controller.getChapters(); controller.getChapters();
controller.currentChapterId = int.parse(backModel!.chapterId); controller.currentChapterId = int.parse(backModel.chapterId);
controller.getBookDetails(); controller.getBookDetails();
// controller.setCurrentReadChapterId(backModel!.chapterId); // controller.setCurrentReadChapterId(backModel!.chapterId);
} }
......
...@@ -123,7 +123,7 @@ class BookPayController extends GetxController { ...@@ -123,7 +123,7 @@ class BookPayController extends GetxController {
/// 总价钱 /// 总价钱
double getOriginalPrice(){ double getOriginalPrice(){
Decimal price = Decimal.zero; Decimal price = Decimal.zero;
for (CourseModel model in buy!) { for (CourseModel model in buy) {
if (model.status == 1){ if (model.status == 1){
if (model.selected == true){ if (model.selected == true){
price = price + Decimal.parse(model.vipPrice??'0.00'); price = price + Decimal.parse(model.vipPrice??'0.00');
......
...@@ -29,9 +29,9 @@ class _BookPayPageState extends State<BookPayPage> { ...@@ -29,9 +29,9 @@ class _BookPayPageState extends State<BookPayPage> {
physics: const NeverScrollableScrollPhysics(), physics: const NeverScrollableScrollPhysics(),
shrinkWrap:true, shrinkWrap:true,
itemBuilder: (BuildContext context, int index){ itemBuilder: (BuildContext context, int index){
return BuildItem(model: controller.buy![index],); return BuildItem(model: controller.buy[index],);
}, },
itemCount: controller.buy!.length, itemCount: controller.buy.length,
), ),
controller.showModel.couponSwitch =='0' && controller.showModel.integralSwitch =='0'?const SizedBox():SizedBox(height: 10.w,), controller.showModel.couponSwitch =='0' && controller.showModel.integralSwitch =='0'?const SizedBox():SizedBox(height: 10.w,),
Visibility( Visibility(
......
...@@ -33,11 +33,9 @@ class ChangePhoneController extends GetxController { ...@@ -33,11 +33,9 @@ class ChangePhoneController extends GetxController {
/// 停止计时器 /// 停止计时器
void stop() { void stop() {
if (_timer != null) { _timer.cancel();
_timer.cancel(); _isCounting = false;
_isCounting = false; _countDown = 60;
}
_countDown = 60;
} }
/// 是否可以点击 /// 是否可以点击
......
...@@ -32,11 +32,9 @@ class ForgetPwdController extends GetxController { ...@@ -32,11 +32,9 @@ class ForgetPwdController extends GetxController {
/// 停止计时器 /// 停止计时器
void stop() { void stop() {
if (_timer != null) { _timer.cancel();
_timer.cancel(); _isCounting = false;
_isCounting = false; _countDown = 60;
}
_countDown = 60;
} }
/// 是否可点击 /// 是否可点击
......
...@@ -18,7 +18,7 @@ class BuildItem extends StatelessWidget { ...@@ -18,7 +18,7 @@ class BuildItem extends StatelessWidget {
Row( Row(
children: <Widget>[ children: <Widget>[
Text( Text(
'${model!.index}.', '${model.index}.',
style: TextStyle( style: TextStyle(
fontSize: 14.w, height: 1.5.w, color: Colours.c3), fontSize: 14.w, height: 1.5.w, color: Colours.c3),
), ),
......
...@@ -81,11 +81,9 @@ class LoginController extends GetxController { ...@@ -81,11 +81,9 @@ class LoginController extends GetxController {
/// 停止计时器 /// 停止计时器
void stop() { void stop() {
if (_timer != null) { _timer.cancel();
_timer.cancel(); _isCounting = false;
_isCounting = false; _countDown = 60;
}
_countDown = 60;
} }
/// 是否可点击 /// 是否可点击
......
...@@ -12,7 +12,6 @@ import 'package:flutter_book/theme.dart'; ...@@ -12,7 +12,6 @@ import 'package:flutter_book/theme.dart';
import 'package:flutter_book/utils/index.dart'; import 'package:flutter_book/utils/index.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:get/get_state_manager/src/simple/get_controllers.dart';
import 'package:go_router/go_router.dart'; import 'package:go_router/go_router.dart';
import '../../routes/index.dart'; import '../../routes/index.dart';
......
...@@ -7,7 +7,6 @@ import 'package:flutter_book/utils/index.dart'; ...@@ -7,7 +7,6 @@ import 'package:flutter_book/utils/index.dart';
import 'package:flutter_book/widgets/index.dart'; import 'package:flutter_book/widgets/index.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:get/get_state_manager/src/simple/get_controllers.dart';
import 'package:go_router/go_router.dart'; import 'package:go_router/go_router.dart';
import '../../apis/index.dart'; import '../../apis/index.dart';
......
...@@ -16,7 +16,6 @@ import 'package:flutter_book/utils/index.dart'; ...@@ -16,7 +16,6 @@ import 'package:flutter_book/utils/index.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:flutter_sound/public/flutter_sound_recorder.dart'; import 'package:flutter_sound/public/flutter_sound_recorder.dart';
import 'package:flutter_sound_platform_interface/flutter_sound_platform_interface.dart'; import 'package:flutter_sound_platform_interface/flutter_sound_platform_interface.dart';
import 'package:flutter_sound_platform_interface/flutter_sound_recorder_platform_interface.dart';
import 'package:flutter_tts/flutter_tts.dart'; import 'package:flutter_tts/flutter_tts.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:go_router/go_router.dart'; import 'package:go_router/go_router.dart';
......
...@@ -151,6 +151,7 @@ class _ReadNotePageState extends State<ReadNotePage> { ...@@ -151,6 +151,7 @@ class _ReadNotePageState extends State<ReadNotePage> {
}, },
); );
} }
return null;
}, },
itemCount: controller.notes.length, itemCount: controller.notes.length,
), ),
......
...@@ -53,7 +53,7 @@ class _BuildHistoryState extends State<BuildHistory> { ...@@ -53,7 +53,7 @@ class _BuildHistoryState extends State<BuildHistory> {
} }
List <Widget> _buildItem(List<String> searchList){ List <Widget> _buildItem(List<String> searchList){
if (searchList == null || searchList.isEmpty){ if (searchList.isEmpty){
List<Widget> list = [ List<Widget> list = [
const SizedBox( const SizedBox(
width: 0, width: 0,
......
...@@ -13,7 +13,7 @@ class CoinRechargeController extends GetxController { ...@@ -13,7 +13,7 @@ class CoinRechargeController extends GetxController {
List<IAPItem> _items = []; List<IAPItem> _items = [];
List<PurchasedItem> _purchases = []; List<PurchasedItem> _purchases = [];
//未完成的订单 //未完成的订单
List<PurchasedItem> _pendingPurchases = []; final List<PurchasedItem> _pendingPurchases = [];
// 支付宝 // 支付宝
Tobias tobias = Tobias(); Tobias tobias = Tobias();
// 微信 // 微信
......
...@@ -375,7 +375,7 @@ class _BuildDiscussState extends State<BuildDiscuss> { ...@@ -375,7 +375,7 @@ class _BuildDiscussState extends State<BuildDiscuss> {
void _showKeyboard(BuildContext context) { void _showKeyboard(BuildContext context) {
_focusNode.requestFocus(); _focusNode.requestFocus();
FocusScope.of(context).requestFocus(_focusNode); FocusScope.of(context).requestFocus(_focusNode);
Overlay.of(context)?.insert( Overlay.of(context).insert(
OverlayEntry( OverlayEntry(
builder: (context) => Positioned( builder: (context) => Positioned(
bottom: MediaQuery.of(context).viewInsets.bottom, bottom: MediaQuery.of(context).viewInsets.bottom,
......
...@@ -130,7 +130,7 @@ class UserEditNoteController extends GetxController { ...@@ -130,7 +130,7 @@ class UserEditNoteController extends GetxController {
_mRecorder.startRecorder( _mRecorder.startRecorder(
toFile: '$filePath/$fileName', toFile: '$filePath/$fileName',
audioSource: sound_recorder_platform.AudioSource.microphone, audioSource: AudioSource.microphone,
codec: Codec.aacMP4, codec: Codec.aacMP4,
); );
} }
......
...@@ -10,7 +10,6 @@ import 'package:flutter_book/utils/index.dart'; ...@@ -10,7 +10,6 @@ import 'package:flutter_book/utils/index.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:flutter_sound/public/flutter_sound_recorder.dart'; import 'package:flutter_sound/public/flutter_sound_recorder.dart';
import 'package:flutter_sound_platform_interface/flutter_sound_platform_interface.dart'; import 'package:flutter_sound_platform_interface/flutter_sound_platform_interface.dart';
import 'package:flutter_sound_platform_interface/flutter_sound_recorder_platform_interface.dart' as sound_recorder_platform;
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:go_router/go_router.dart'; import 'package:go_router/go_router.dart';
import 'package:just_audio/just_audio.dart' as just_audio; import 'package:just_audio/just_audio.dart' as just_audio;
......
...@@ -36,7 +36,7 @@ class UserOrderController extends GetxController ...@@ -36,7 +36,7 @@ class UserOrderController extends GetxController
} }
/// 获取订单列表 /// 获取订单列表
Future<void> _getOrders({bool isRefresh = false, String keys ='',int ?tabIndex}) async { Future<void> _getOrders({bool isRefresh = false, String keys =''}) async {
if (isRefresh) _page = 1; if (isRefresh) _page = 1;
// 网路请求 // 网路请求
final result = await MineAPI.orderList( final result = await MineAPI.orderList(
......
...@@ -65,6 +65,7 @@ class _BuildListPageState extends State<BuildListPage> ...@@ -65,6 +65,7 @@ class _BuildListPageState extends State<BuildListPage>
return BuiltRefunded(model: model,); return BuiltRefunded(model: model,);
} }
} }
return null;
}, },
itemCount: controller.orderList.length, itemCount: controller.orderList.length,
// itemCount: widget.models.length, // itemCount: widget.models.length,
......
...@@ -68,6 +68,7 @@ class _SearchPageState extends State<OrderSearchPage> { ...@@ -68,6 +68,7 @@ class _SearchPageState extends State<OrderSearchPage> {
return BuiltRefunded(model: model,); return BuiltRefunded(model: model,);
} }
} }
return null;
}, },
itemCount: controller.orderList.length, itemCount: controller.orderList.length,
// itemCount: widget.models.length, // itemCount: widget.models.length,
......
...@@ -69,7 +69,7 @@ class _UserOrderAwaitingState extends State<UserOrderAwaitingPage> { ...@@ -69,7 +69,7 @@ class _UserOrderAwaitingState extends State<UserOrderAwaitingPage> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Image.network( Image.network(
myController.model?.bookList?[0].img ?? '', myController.model.bookList?[0].img ?? '',
fit: BoxFit.cover, // 设置适应方式为充满 fit: BoxFit.cover, // 设置适应方式为充满
width: 72.0.w, width: 72.0.w,
height: 86.0.w, height: 86.0.w,
......
...@@ -50,7 +50,7 @@ class _UserOrderRefundedState extends State<UserOrderCancelDetailPage> { ...@@ -50,7 +50,7 @@ class _UserOrderRefundedState extends State<UserOrderCancelDetailPage> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Image.network( Image.network(
controller.model?.bookList==null?'http://zxts-book-file.zijingebook.com/2024-01/29/b91194564969b9151fa382807977282acdffa22d.jpg': controller.model.bookList==null?'http://zxts-book-file.zijingebook.com/2024-01/29/b91194564969b9151fa382807977282acdffa22d.jpg':
controller.model.bookList![0].img??'', controller.model.bookList![0].img??'',
// 用实际图片链接替换 // 用实际图片链接替换
fit: BoxFit.cover, // 设置适应方式为充满 fit: BoxFit.cover, // 设置适应方式为充满
...@@ -70,7 +70,7 @@ class _UserOrderRefundedState extends State<UserOrderCancelDetailPage> { ...@@ -70,7 +70,7 @@ class _UserOrderRefundedState extends State<UserOrderCancelDetailPage> {
SizedBox( SizedBox(
height: 62.5.w, height: 62.5.w,
child: Text( child: Text(
controller.model?.bookList?[0].name??'', controller.model.bookList?[0].name??'',
style: TextStyle( style: TextStyle(
color: Colours.c3, color: Colours.c3,
fontWeight: Fonts.bold, fontWeight: Fonts.bold,
......
...@@ -28,7 +28,7 @@ class UserOrderCoinAwaitingController extends GetxController { ...@@ -28,7 +28,7 @@ class UserOrderCoinAwaitingController extends GetxController {
List<IAPItem> _items = []; List<IAPItem> _items = [];
List<PurchasedItem> _purchases = []; List<PurchasedItem> _purchases = [];
///未完成的订单 ///未完成的订单
List<PurchasedItem> _pendingPurchases = []; final List<PurchasedItem> _pendingPurchases = [];
// 紫荆币数据 // 紫荆币数据
List<CoinModel> data = []; List<CoinModel> data = [];
......
...@@ -28,7 +28,7 @@ class UserOrderCoinCancelController extends GetxController { ...@@ -28,7 +28,7 @@ class UserOrderCoinCancelController extends GetxController {
List<IAPItem> _items = []; List<IAPItem> _items = [];
List<PurchasedItem> _purchases = []; List<PurchasedItem> _purchases = [];
///未完成的订单 ///未完成的订单
List<PurchasedItem> _pendingPurchases = []; final List<PurchasedItem> _pendingPurchases = [];
List<CoinModel> data = []; List<CoinModel> data = [];
......
...@@ -27,7 +27,7 @@ class UserOrderCoinCompletedController extends GetxController { ...@@ -27,7 +27,7 @@ class UserOrderCoinCompletedController extends GetxController {
List<IAPItem> _items = []; List<IAPItem> _items = [];
List<PurchasedItem> _purchases = []; List<PurchasedItem> _purchases = [];
///未完成的订单 ///未完成的订单
List<PurchasedItem> _pendingPurchases = []; final List<PurchasedItem> _pendingPurchases = [];
List<CoinModel> data = []; List<CoinModel> data = [];
......
...@@ -41,7 +41,7 @@ class _UserOrderEvaluatePageState extends State<UserOrderEvaluatePage> with Auto ...@@ -41,7 +41,7 @@ class _UserOrderEvaluatePageState extends State<UserOrderEvaluatePage> with Auto
onTap: () { onTap: () {
controller.focusNodes[_index]!.unfocus(); controller.focusNodes[_index]!.unfocus();
}, },
child: (controller.orderInfoModel==null ||controller.orderInfoModel.bookList==null)? child: (controller.orderInfoModel.bookList==null)?
Container( Container(
alignment: Alignment.center, alignment: Alignment.center,
child: const CircularProgressIndicator(),): child: const CircularProgressIndicator(),):
......
...@@ -50,7 +50,7 @@ class _UserOrderRefundedState extends State<UserOrderRefundedPage> { ...@@ -50,7 +50,7 @@ class _UserOrderRefundedState extends State<UserOrderRefundedPage> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Image.network( Image.network(
controller.model?.bookList==null?'http://zxts-book-file.zijingebook.com/2024-01/29/b91194564969b9151fa382807977282acdffa22d.jpg': controller.model.bookList==null?'http://zxts-book-file.zijingebook.com/2024-01/29/b91194564969b9151fa382807977282acdffa22d.jpg':
controller.model.bookList![0].img??'', controller.model.bookList![0].img??'',
// 用实际图片链接替换 // 用实际图片链接替换
fit: BoxFit.cover, // 设置适应方式为充满 fit: BoxFit.cover, // 设置适应方式为充满
...@@ -70,7 +70,7 @@ class _UserOrderRefundedState extends State<UserOrderRefundedPage> { ...@@ -70,7 +70,7 @@ class _UserOrderRefundedState extends State<UserOrderRefundedPage> {
SizedBox( SizedBox(
height: 62.5.w, height: 62.5.w,
child: Text( child: Text(
controller.model?.bookList?[0].name??'', controller.model.bookList?[0].name??'',
style: TextStyle( style: TextStyle(
color: Colours.c3, color: Colours.c3,
fontWeight: Fonts.bold, fontWeight: Fonts.bold,
......
...@@ -72,7 +72,6 @@ abstract class AppTheme { ...@@ -72,7 +72,6 @@ abstract class AppTheme {
static ThemeData get light { static ThemeData get light {
var scheme = ColorScheme.light( var scheme = ColorScheme.light(
background: Colors.white,
onBackground: const Color(0xFF333333), onBackground: const Color(0xFF333333),
surface: Colors.white, surface: Colors.white,
onSurface: const Color(0xFF333333), onSurface: const Color(0xFF333333),
...@@ -91,7 +90,6 @@ abstract class AppTheme { ...@@ -91,7 +90,6 @@ abstract class AppTheme {
static ThemeData get dark { static ThemeData get dark {
var scheme = ColorScheme.dark( var scheme = ColorScheme.dark(
background: const Color(0xFF0D0D0D),
onBackground: Colors.white, onBackground: Colors.white,
surface: const Color(0xFF252525), surface: const Color(0xFF252525),
onSurface: Colors.white, onSurface: Colors.white,
...@@ -112,7 +110,7 @@ abstract class AppTheme { ...@@ -112,7 +110,7 @@ abstract class AppTheme {
return ThemeData( return ThemeData(
useMaterial3: false, useMaterial3: false,
colorScheme: scheme, colorScheme: scheme,
scaffoldBackgroundColor: scheme.background, scaffoldBackgroundColor: scheme.surface,
splashColor: Colors.transparent, splashColor: Colors.transparent,
highlightColor: Colors.transparent, highlightColor: Colors.transparent,
dialogTheme: DialogTheme( dialogTheme: DialogTheme(
...@@ -149,12 +147,12 @@ abstract class AppTheme { ...@@ -149,12 +147,12 @@ abstract class AppTheme {
centerTitle: true, centerTitle: true,
toolbarHeight: 56.w, toolbarHeight: 56.w,
iconTheme: IconThemeData( iconTheme: IconThemeData(
color: scheme.onBackground, color: scheme.onSurface,
size: 22.w, size: 22.w,
), ),
titleTextStyle: TextStyle( titleTextStyle: TextStyle(
color: scheme.onBackground, color: scheme.onSurface,
fontSize: 17.w, fontSize: 17.w,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
height: 1.2, height: 1.2,
...@@ -169,13 +167,13 @@ abstract class AppTheme { ...@@ -169,13 +167,13 @@ abstract class AppTheme {
textTheme: TextTheme( textTheme: TextTheme(
bodyMedium: TextStyle( bodyMedium: TextStyle(
fontSize: 16.w, fontSize: 16.w,
color: scheme.onBackground, color: scheme.onSurface,
), ),
labelLarge: TextStyle( labelLarge: TextStyle(
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontSize: 16.w, fontSize: 16.w,
height: 1.2, height: 1.2,
color: scheme.onBackground, color: scheme.onSurface,
), ),
), ),
// bottomAppBarTheme: BottomAppBarTheme( // bottomAppBarTheme: BottomAppBarTheme(
...@@ -193,7 +191,7 @@ abstract class AppTheme { ...@@ -193,7 +191,7 @@ abstract class AppTheme {
selectedLabelStyle: TextStyle(fontSize: 11.w, fontWeight: Fonts.medium), selectedLabelStyle: TextStyle(fontSize: 11.w, fontWeight: Fonts.medium),
unselectedIconTheme: IconThemeData( unselectedIconTheme: IconThemeData(
size: 15.w, size: 15.w,
color: scheme.onBackground.withOpacity(0.5), color: scheme.onSurface.withOpacity(0.5),
), ),
selectedIconTheme: IconThemeData( selectedIconTheme: IconThemeData(
size: 15.w, size: 15.w,
...@@ -202,17 +200,17 @@ abstract class AppTheme { ...@@ -202,17 +200,17 @@ abstract class AppTheme {
), ),
outlinedButtonTheme: OutlinedButtonThemeData( outlinedButtonTheme: OutlinedButtonThemeData(
style: ButtonStyle( style: ButtonStyle(
elevation: MaterialStateProperty.all(0), elevation: WidgetStateProperty.all(0),
minimumSize: MaterialStateProperty.all(Size.zero), minimumSize: WidgetStateProperty.all(Size.zero),
tapTargetSize: MaterialTapTargetSize.shrinkWrap, tapTargetSize: MaterialTapTargetSize.shrinkWrap,
overlayColor: MaterialStateProperty.all(Colors.transparent), overlayColor: WidgetStateProperty.all(Colors.transparent),
), ),
), ),
inputDecorationTheme: InputDecorationTheme( inputDecorationTheme: InputDecorationTheme(
isCollapsed: true, isCollapsed: true,
isDense: true, isDense: true,
filled: true, filled: true,
fillColor: scheme.background, fillColor: scheme.surface,
labelStyle: TextStyle( labelStyle: TextStyle(
fontSize: 15.w, fontSize: 15.w,
color: Colours.c3, color: Colours.c3,
...@@ -220,7 +218,7 @@ abstract class AppTheme { ...@@ -220,7 +218,7 @@ abstract class AppTheme {
), ),
helperStyle: TextStyle( helperStyle: TextStyle(
fontSize: 15.w, fontSize: 15.w,
color: scheme.onBackground.withOpacity(0.7), color: scheme.onSurface.withOpacity(0.7),
), ),
contentPadding: EdgeInsets.symmetric( contentPadding: EdgeInsets.symmetric(
horizontal: 10.w, horizontal: 10.w,
...@@ -253,7 +251,7 @@ abstract class AppTheme { ...@@ -253,7 +251,7 @@ abstract class AppTheme {
), ),
tabBarTheme: TabBarTheme( tabBarTheme: TabBarTheme(
labelColor: scheme.primary, labelColor: scheme.primary,
unselectedLabelColor: scheme.background, unselectedLabelColor: scheme.surface,
labelStyle: TextStyle( labelStyle: TextStyle(
color: scheme.onPrimary, color: scheme.onPrimary,
fontSize: 16.w, fontSize: 16.w,
...@@ -268,7 +266,7 @@ abstract class AppTheme { ...@@ -268,7 +266,7 @@ abstract class AppTheme {
), ),
dividerTheme: DividerThemeData( dividerTheme: DividerThemeData(
thickness: 1.w, thickness: 1.w,
color: scheme.onBackground.withOpacity(0.08), color: scheme.onSurface.withOpacity(0.08),
), ),
); );
} }
......
...@@ -87,11 +87,11 @@ class CustomButton extends StatelessWidget { ...@@ -87,11 +87,11 @@ class CustomButton extends StatelessWidget {
child: OutlinedButton( child: OutlinedButton(
onPressed: onPressed, onPressed: onPressed,
style: ButtonStyle( style: ButtonStyle(
textStyle: MaterialStateProperty.all( textStyle: WidgetStateProperty.all(
Theme.of(context).textTheme.labelLarge?.copyWith(fontSize: _fontSize), Theme.of(context).textTheme.labelLarge?.copyWith(fontSize: _fontSize),
), ),
padding: MaterialStateProperty.all(padding ?? _padding), padding: WidgetStateProperty.all(padding ?? _padding),
foregroundColor: MaterialStateProperty.resolveWith((states) { foregroundColor: WidgetStateProperty.resolveWith((states) {
switch (type) { switch (type) {
case CustomButtonType.filled: case CustomButtonType.filled:
return foregroundColor ?? return foregroundColor ??
...@@ -100,25 +100,25 @@ class CustomButton extends StatelessWidget { ...@@ -100,25 +100,25 @@ class CustomButton extends StatelessWidget {
case CustomButtonType.borderless: case CustomButtonType.borderless:
final color = foregroundColor ?? colorScheme.primary; final color = foregroundColor ?? colorScheme.primary;
final opacity = color.opacity / 2; final opacity = color.opacity / 2;
if (states.contains(MaterialState.pressed)) { if (states.contains(WidgetState.pressed)) {
return color.withOpacity(opacity); return color.withOpacity(opacity);
} }
if (states.contains(MaterialState.disabled)) { if (states.contains(WidgetState.disabled)) {
return color.withOpacity(opacity); return color.withOpacity(opacity);
} }
return color; return color;
} }
}), }),
backgroundColor: MaterialStateProperty.resolveWith((states) { backgroundColor: WidgetStateProperty.resolveWith((states) {
switch (type) { switch (type) {
case CustomButtonType.filled: case CustomButtonType.filled:
final color = backgroundColor ?? final color = backgroundColor ??
colorScheme.primary.withOpacity(isIcon ? 0.1 : 1); colorScheme.primary.withOpacity(isIcon ? 0.1 : 1);
final opacity = color.opacity / 2; final opacity = color.opacity / 2;
if (states.contains(MaterialState.pressed)) { if (states.contains(WidgetState.pressed)) {
return color.withOpacity(opacity); return color.withOpacity(opacity);
} }
if (states.contains(MaterialState.disabled)) { if (states.contains(WidgetState.disabled)) {
return color.withOpacity(opacity); return color.withOpacity(opacity);
} }
return color; return color;
...@@ -127,7 +127,7 @@ class CustomButton extends StatelessWidget { ...@@ -127,7 +127,7 @@ class CustomButton extends StatelessWidget {
return Colors.transparent; return Colors.transparent;
} }
}), }),
side: MaterialStateProperty.resolveWith((states) { side: WidgetStateProperty.resolveWith((states) {
switch (type) { switch (type) {
case CustomButtonType.filled: case CustomButtonType.filled:
case CustomButtonType.borderless: case CustomButtonType.borderless:
...@@ -135,13 +135,13 @@ class CustomButton extends StatelessWidget { ...@@ -135,13 +135,13 @@ class CustomButton extends StatelessWidget {
case CustomButtonType.ghost: case CustomButtonType.ghost:
final color = foregroundColor ?? colorScheme.primary; final color = foregroundColor ?? colorScheme.primary;
final opacity = color.opacity / 2; final opacity = color.opacity / 2;
if (states.contains(MaterialState.pressed)) { if (states.contains(WidgetState.pressed)) {
return BorderSide( return BorderSide(
color: color.withOpacity(opacity), color: color.withOpacity(opacity),
width: 2.w, width: 2.w,
); );
} }
if (states.contains(MaterialState.disabled)) { if (states.contains(WidgetState.disabled)) {
return BorderSide(color: color.withOpacity(opacity)); return BorderSide(color: color.withOpacity(opacity));
} }
return BorderSide( return BorderSide(
...@@ -150,7 +150,7 @@ class CustomButton extends StatelessWidget { ...@@ -150,7 +150,7 @@ class CustomButton extends StatelessWidget {
); );
} }
}), }),
shape: MaterialStateProperty.all(_shape), shape: WidgetStateProperty.all(_shape),
), ),
child: child, child: child,
), ),
......
差异被折叠。
...@@ -42,41 +42,41 @@ dependencies: ...@@ -42,41 +42,41 @@ dependencies:
# The following adds the Cupertino Icons font to your application. # The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons. # Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.2 cupertino_icons: ^1.0.2
logger: 1.3.0 logger: ^2.0.0
# getX # getX
get: 4.6.5 get: ^4.6.5
# 路由 # 路由
go_router: 10.1.0 go_router: ^10.1.0
flutter_easyloading: 3.0.5 flutter_easyloading: ^3.0.5
# 存储基本数据 # 存储基本数据
shared_preferences: 2.1.1 shared_preferences: ^2.3.0
# 屏幕适配 # 屏幕适配
flutter_screenutil: 5.8.2 flutter_screenutil: ^5.8.2
# 加载图片 # 加载图片
extended_image: 8.0.2 extended_image: ^8.0.2
# 网络 # 网络
dio: 5.3.3 dio: ^5.3.3
crypto: 3.0.3 crypto: ^3.0.3
convert: 3.0.1 convert: ^3.0.1
# 录音 # 录音
flutter_tts: 3.8.5 flutter_tts: ^3.8.5
# webview # webview
flutter_inappwebview: ^6.0.0 flutter_inappwebview: ^6.0.0
intl: 0.18.0 intl: ^0.19.0
# 录音 # 录音
flutter_sound: ^9.2.13 flutter_sound: 9.30.0
permission_handler: 11.0.1 permission_handler: ^12.0.0
audio_session: ^0.1.6 audio_session: ^0.1.6
flutter_sound_platform_interface: 9.2.13 flutter_sound_platform_interface: 9.30.0
# 获取目录结构 # 获取目录结构
path_provider: ^2.0.2 path_provider: ^2.0.2
# 下拉刷新 上拉加载更多 # 下拉刷新 上拉加载更多
easy_refresh: 3.3.2+1 easy_refresh: ^3.3.2+1
# 角标 # 角标
badges: ^3.1.2 badges: ^3.1.2
# 图片预览 或 banner # 图片预览 或 banner
carousel_slider: 4.2.1 carousel_slider: 5.1.2
# 评星 # 评星
flutter_star: ^1.2.0 flutter_star: ^1.2.0
# toast # toast
...@@ -88,7 +88,7 @@ dependencies: ...@@ -88,7 +88,7 @@ dependencies:
# 微信支付 # 微信支付
fluwx: ^4.4.9 fluwx: ^4.4.9
# #
image_picker: 0.8.7+5 image_picker: ^1.1.0
# 获取package 信息 # 获取package 信息
package_info_plus: ^4.2.0 package_info_plus: ^4.2.0
# 版本更新 # 版本更新
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论