提交 51ae530b authored 作者: 史晓晨's avatar 史晓晨

调试-90%

上级 403f3632
......@@ -2,7 +2,7 @@ group 'com.clx.account_center'
version '1.0-SNAPSHOT'
buildscript {
ext.kotlin_version = '1.8.10'
ext.kotlin_version = '1.8.20'
repositories {
maven { setUrl("https://maven.aliyun.com/repository/central") }
maven { setUrl("https://maven.aliyun.com/repository/jcenter") }
......@@ -14,7 +14,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:7.1.3'
classpath 'com.android.tools.build:gradle:8.1.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
......@@ -38,11 +38,19 @@ apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
android {
compileSdkVersion 31
namespace "com.clx.account_center"
// 1. 升级 compileSdk 至 36(AGP 8.13 最佳兼容版本,替代 compileSdkVersion)
compileSdk 34
// 2. JDK 版本需升级至 17(AGP 8.13 强制要求)
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
// 3. Kotlin JVM 目标版本同步为 17
kotlinOptions {
jvmTarget = '17'
}
// packagingOptions {
......@@ -51,16 +59,12 @@ android {
// pickFirst "lib/armeabi-v7a/libc++_shared.so"
// }
kotlinOptions {
jvmTarget = '1.8'
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
defaultConfig {
minSdkVersion 19
minSdkVersion 21
}
viewBinding {
enabled = true
......
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.clx.account_center">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.CAMERA" />
......@@ -9,25 +8,23 @@
<!-- 必要权限,安装权限 -->
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
<!--拨打电话权限-->
<uses-permission android:name="android.permission.CALL_PHONE"/>
<uses-permission android:name="android.permission.CALL_PHONE" />
<!--允许获取精确位置,精准定位必选-->
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<!--允许获取粗略位置,粗略定位必选-->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_SETTINGS"/>
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
<uses-permission android:name="android.permission.BLUETOOTH_SCAN" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<application
android:usesCleartextTraffic="true"
>
<application android:usesCleartextTraffic="true">
<activity
android:theme="@style/AppTheme"
android:name="com.clx.account_center.H5Activity"
android:exported="true">
android:exported="true"
android:theme="@style/AppTheme">
<!-- 深度链接配置 -->
</activity>
</application>
......
......@@ -26,16 +26,21 @@ apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android {
compileSdkVersion 33
namespace "com.clx.account_center_example"
ndkVersion flutter.ndkVersion
// 1. 升级 compileSdk 至 36(AGP 8.13 最佳兼容版本,替代 compileSdkVersion)
compileSdk 34
// 2. JDK 版本需升级至 17(AGP 8.13 强制要求)
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
// 3. Kotlin JVM 目标版本同步为 17
kotlinOptions {
jvmTarget = '1.8'
jvmTarget = '17'
}
sourceSets {
......@@ -48,7 +53,7 @@ android {
// 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 21
targetSdkVersion 32
targetSdkVersion 31
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
multiDexEnabled true
......@@ -74,5 +79,5 @@ flutter {
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
}
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.clx.account_center_example">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<!-- The INTERNET permission is required for development. Specifically,
the Flutter tool needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.INTERNET" />
</manifest>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.clx.account_center_example">
<uses-permission android:name="android.permission.INTERNET"/>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.CAMERA" />
......@@ -10,28 +10,29 @@
<!-- 必要权限,安装权限 -->
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
<!--拨打电话权限-->
<uses-permission android:name="android.permission.CALL_PHONE"/>
<uses-permission android:name="android.permission.CALL_PHONE" />
<!--允许获取精确位置,精准定位必选-->
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<!--允许获取粗略位置,粗略定位必选-->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_SETTINGS"/>
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
<uses-permission android:name="android.permission.BLUETOOTH_SCAN" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<application
android:label="account_center_example"
android:name="${applicationName}"
android:icon="@drawable/img">
android:icon="@drawable/img"
android:label="account_center_example">
<activity
android:name=".MainActivity"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:exported="true"
android:hardwareAccelerated="true"
android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
<!-- Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user
......@@ -39,11 +40,10 @@
to determine the Window background behind the Flutter UI. -->
<meta-data
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme"
/>
android:resource="@style/NormalTheme" />
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
......@@ -53,11 +53,13 @@
<!-- 深度链接配置 -->
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:scheme="clx"
android:host="msl-detection-app" /> <!-- 自己产品的productCode -->
android:host="msl-detection-app"
android:scheme="clx" /> <!-- 自己产品的productCode -->
</intent-filter>
</activity>
......
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.clx.account_center_example">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<!-- The INTERNET permission is required for development. Specifically,
the Flutter tool needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.INTERNET" />
</manifest>
buildscript {
ext.kotlin_version = '1.8.10'
ext.kotlin_version = '1.8.20'
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.1.2'
classpath 'com.android.tools.build:gradle:8.1.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
......
......@@ -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.4-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1-bin.zip
......@@ -12,8 +12,8 @@ packages:
dependency: transitive
description:
path: "."
ref: "v1.0.4"
resolved-ref: "5dc8add13169b3a82f217cc12212993e2598dfa7"
ref: "v1.0.4-flutter-3.24.5"
resolved-ref: "6538831051fec8c337ff665b2528571393f91180"
url: "https://dev:devfortesting@t.clxkj.cn/openSourceLibrary/aliyun_face_plugin.git"
source: git
version: "0.0.1"
......@@ -33,14 +33,6 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.11.0"
auto_size_text:
dependency: transitive
description:
name: auto_size_text
sha256: "3f5261cd3fb5f2a9ab4e2fc3fba84fd9fcaac8821f20a1d4e71f557521b22599"
url: "https://pub.flutter-io.cn"
source: hosted
version: "3.0.0"
boolean_selector:
dependency: transitive
description:
......@@ -53,26 +45,26 @@ packages:
dependency: transitive
description:
name: cached_network_image
sha256: fd3d0dc1d451f9a252b32d95d3f0c3c487bc41a75eba2e6097cb0b9c71491b15
sha256: "7c1183e361e5c8b0a0f21a28401eecdbde252441106a9816400dd4c2b2424916"
url: "https://pub.flutter-io.cn"
source: hosted
version: "3.2.3"
version: "3.4.1"
cached_network_image_platform_interface:
dependency: transitive
description:
name: cached_network_image_platform_interface
sha256: bb2b8403b4ccdc60ef5f25c70dead1f3d32d24b9d6117cfc087f496b178594a7
sha256: "35814b016e37fbdc91f7ae18c8caf49ba5c88501813f73ce8a07027a395e2829"
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.0.0"
version: "4.1.1"
cached_network_image_web:
dependency: transitive
description:
name: cached_network_image_web
sha256: b8eb814ebfcb4dea049680f8c1ffb2df399e4d03bf7a352c775e26fa06e02fa0
sha256: "980842f4e8e2535b8dbd3d5ca0b1f0ba66bf61d14cc3a17a9b4788a3685ba062"
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.0.2"
version: "1.3.1"
characters:
dependency: transitive
description:
......@@ -109,18 +101,18 @@ packages:
dependency: transitive
description:
name: connectivity_plus
sha256: "224a77051d52a11fbad53dd57827594d3bd24f945af28bd70bab376d68d437f0"
sha256: b5e72753cf63becce2c61fd04dfe0f1c430cc5278b53a1342dc5ad839eab29ec
url: "https://pub.flutter-io.cn"
source: hosted
version: "5.0.2"
version: "6.1.5"
connectivity_plus_platform_interface:
dependency: transitive
description:
name: connectivity_plus_platform_interface
sha256: cf1d1c28f4416f8c654d7dc3cd638ec586076255d407cef3ddbdaf178272a71a
sha256: "42657c1715d48b167930d5f34d00222ac100475f73d10162ddf43e714932f204"
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.2.4"
version: "2.0.1"
convert:
dependency: transitive
description:
......@@ -177,30 +169,14 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "3.2.4"
device_info:
dependency: transitive
description:
name: device_info
sha256: f4a8156cb7b7480d969cb734907d18b333c8f0bc0b1ad0b342cdcecf30d62c48
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.0.3"
device_info_platform_interface:
dependency: transitive
description:
name: device_info_platform_interface
sha256: b148e0bf9640145d09a4f8dea96614076f889e7f7f8b5ecab1c7e5c2dbc73c1b
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.0.1"
device_info_plus:
dependency: transitive
description:
name: device_info_plus
sha256: f52ab3b76b36ede4d135aab80194df8925b553686f0fa12226b4e2d658e45903
sha256: "72d146c6d7098689ff5c5f66bcf593ac11efc530095385356e131070333e64da"
url: "https://pub.flutter-io.cn"
source: hosted
version: "8.2.2"
version: "11.3.0"
device_info_plus_platform_interface:
dependency: transitive
description:
......@@ -237,10 +213,10 @@ packages:
dependency: transitive
description:
name: external_path
sha256: "2095c626fbbefe70d5a4afc9b1137172a68ee2c276e51c3c1283394485bea8f4"
sha256: "68a18a2aa51ec012d7013ea2a80305dc5372f3577a2bbcc7dcc5550b25a5a73b"
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.0.3"
version: "2.2.0"
fake_async:
dependency: transitive
description:
......@@ -250,29 +226,29 @@ packages:
source: hosted
version: "1.3.1"
ffi:
dependency: "direct overridden"
dependency: transitive
description:
name: ffi
sha256: a38574032c5f1dd06c4aee541789906c12ccaab8ba01446e800d9c5b79c4a978
sha256: "16ed7b077ef01ad6170a3d0c57caa4a112a38d7a2ed5602e0aca9ca6f3d98da6"
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.0.1"
version: "2.1.3"
file:
dependency: transitive
description:
name: file
sha256: "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d"
sha256: a3b4f84adafef897088c160faf7dfffb7696046cb13ae90b508c2cbc95d3b8d4
url: "https://pub.flutter-io.cn"
source: hosted
version: "6.1.4"
version: "7.0.1"
file_picker:
dependency: transitive
description:
name: file_picker
sha256: "9d6e95ec73abbd31ec54d0e0df8a961017e165aba1395e462e5b31ea0c165daf"
sha256: e7e16c9d15c36330b94ca0e2ad8cb61f93cd5282d0158c09805aed13b5452f22
url: "https://pub.flutter-io.cn"
source: hosted
version: "5.3.1"
version: "10.3.2"
file_selector_linux:
dependency: transitive
description:
......@@ -326,39 +302,23 @@ packages:
description: flutter
source: sdk
version: "0.0.0"
flutter_blurhash:
dependency: transitive
description:
name: flutter_blurhash
sha256: "05001537bd3fac7644fa6558b09ec8c0a3f2eba78c0765f88912882b1331a5c6"
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.7.0"
flutter_cache_manager:
dependency: transitive
description:
name: flutter_cache_manager
sha256: "8207f27539deb83732fdda03e259349046a39a4c767269285f449ade355d54ba"
sha256: "400b6592f16a4409a7f2bb929a9a7e38c72cceb8ffb99ee57bbf2cb2cecf8386"
url: "https://pub.flutter-io.cn"
source: hosted
version: "3.3.1"
version: "3.4.1"
flutter_clx_base:
dependency: "direct main"
dependency: transitive
description:
path: "."
ref: "v1.0.2"
resolved-ref: "252485f95b9a1d47163da06ccd557cfdf31476f3"
ref: "v1.0.3_3.24.5"
resolved-ref: ba99348b05d52cc0a60e844d93223b2c14f7aa92
url: "https://t.clxkj.cn/openSourceLibrary/flutter_clx_base.git"
source: git
version: "1.0.7"
flutter_cupertino_datetime_picker:
dependency: transitive
description:
name: flutter_cupertino_datetime_picker
sha256: "631fbd3abed4d1151888e053d2153d905663a3b33ff24bdfa64afbcf750682cb"
url: "https://pub.flutter-io.cn"
source: hosted
version: "3.0.0"
flutter_easyloading:
dependency: transitive
description:
......@@ -388,14 +348,6 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "6.4.2"
flutter_pdfview:
dependency: transitive
description:
name: flutter_pdfview
sha256: "2e3fa359524e9865ec25a64593b65092b4a9974c5871228c1a771300a003d150"
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.4.0"
flutter_plugin_android_lifecycle:
dependency: transitive
description:
......@@ -416,10 +368,10 @@ packages:
dependency: transitive
description:
name: flutter_svg
sha256: d39e7f95621fc84376bc0f7d504f05c3a41488c562f4a8ad410569127507402c
sha256: d44bf546b13025ec7353091516f6881f1d4c633993cb109c3916c3a0159dadf1
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.0.9"
version: "2.1.0"
flutter_test:
dependency: "direct dev"
description: flutter
......@@ -434,10 +386,10 @@ packages:
dependency: transitive
description:
name: flutter_widget_from_html_core
sha256: "22140caa191cb4bba0fe4d5e4ad875c7e8a9ba47d61517f56d733019cf76396d"
sha256: "50990ec287434a280ed15d602aa3bf6e8db9c54159762d906057a04e9493b91a"
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.10.6"
version: "0.16.1"
fluttertoast:
dependency: transitive
description:
......@@ -458,10 +410,10 @@ packages:
dependency: transitive
description:
name: getwidget
sha256: "6bdf191f91de5f80f9abd49e3cffaef66256167aaa091626ac78d5c81c645335"
sha256: ab0201d6c1d27b508f05fa571e0e5038d60a603fd80303002b882f18b1c77231
url: "https://pub.flutter-io.cn"
source: hosted
version: "3.1.1"
version: "7.0.0"
html:
dependency: transitive
description:
......@@ -474,10 +426,10 @@ packages:
dependency: transitive
description:
name: http
sha256: "5895291c13fa8a3bd82e76d5627f69e0d85ca6a30dcac95c4ea19a5d555879c2"
sha256: bb2ce4590bc2667c96f318d68cac1b5a7987ec819351d32b1c987239a815e007
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.13.6"
version: "1.5.0"
http_parser:
dependency: transitive
description:
......@@ -490,10 +442,10 @@ packages:
dependency: transitive
description:
name: image_picker
sha256: b6951e25b795d053a6ba03af5f710069c99349de9341af95155d52665cb4607c
sha256: "021834d9c0c3de46bf0fe40341fa07168407f694d9b2bb18d532dc1261867f7a"
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.8.9"
version: "1.1.2"
image_picker_android:
dependency: transitive
description:
......@@ -506,10 +458,10 @@ packages:
dependency: transitive
description:
name: image_picker_for_web
sha256: "869fe8a64771b7afbc99fc433a5f7be2fea4d1cb3d7c11a48b6b579eb9c797f0"
sha256: "717eb042ab08c40767684327be06a5d8dbb341fe791d514e4b92c7bbe1b7bb83"
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.2.0"
version: "3.0.6"
image_picker_ios:
dependency: transitive
description:
......@@ -558,22 +510,6 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.19.0"
js:
dependency: transitive
description:
name: js
sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.6.7"
keyboard_actions:
dependency: transitive
description:
name: keyboard_actions
sha256: "31e0ab2a706ac8f58887efa60efc1f19aecdf37d8ab0f665a0f156d1fbeab650"
url: "https://pub.flutter-io.cn"
source: hosted
version: "4.2.0"
leak_tracker:
dependency: transitive
description:
......@@ -610,10 +546,18 @@ packages:
dependency: transitive
description:
name: logger
sha256: "7ad7215c15420a102ec687bb320a7312afd449bac63bfb1c60d9787c27b9767f"
sha256: a7967e31b703831a893bbc3c3dd11db08126fe5f369b5c648a36f821979f5be3
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.4.0"
version: "2.6.2"
logging:
dependency: transitive
description:
name: logging
sha256: c8245ada5f1717ed44271ed1c26b8ce85ca3228fd2ffdb75468ab01979309d61
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.3.0"
matcher:
dependency: transitive
description:
......@@ -658,10 +602,10 @@ packages:
dependency: transitive
description:
name: octo_image
sha256: "107f3ed1330006a3bea63615e81cf637433f5135a52466c7caa0e7152bca9143"
sha256: "34faa6639a78c7e3cbe79be6f9f96535867e879748ade7d17c9b1ae7536293bd"
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.0.2"
version: "2.1.0"
open_filex:
dependency: transitive
description:
......@@ -679,21 +623,21 @@ packages:
source: hosted
version: "0.5.0"
package_info_plus:
dependency: "direct overridden"
dependency: transitive
description:
name: package_info_plus
sha256: "10259b111176fba5c505b102e3a5b022b51dd97e30522e906d6922c745584745"
sha256: "16eee997588c60225bda0488b6dcfac69280a6b7a3cf02c741895dd370a02968"
url: "https://pub.flutter-io.cn"
source: hosted
version: "3.1.2"
version: "8.3.1"
package_info_plus_platform_interface:
dependency: transitive
description:
name: package_info_plus_platform_interface
sha256: "9bc8ba46813a4cc42c66ab781470711781940780fd8beddd0c3da62506d3a6c6"
sha256: "202a487f08836a592a6bd4f901ac69b3a8f146af552bbd14407b6b41e1c3f086"
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.0.1"
version: "3.2.1"
path:
dependency: transitive
description:
......@@ -770,42 +714,50 @@ packages:
dependency: transitive
description:
name: permission_handler
sha256: "5749ebeb7ec0c3865ea17e3eb337174b87747be816dab582c551e1aff6f6bbf3"
sha256: bc917da36261b00137bbc8896bf1482169cd76f866282368948f032c8c1caae1
url: "https://pub.flutter-io.cn"
source: hosted
version: "9.2.0"
version: "12.0.1"
permission_handler_android:
dependency: transitive
description:
name: permission_handler_android
sha256: a512e0fa8abcb0659d938ec2df93a70eb1df1fdea5fdc6d79a866bfd858a28fc
sha256: "1e3bc410ca1bf84662104b100eb126e066cb55791b7451307f9708d4007350e6"
url: "https://pub.flutter-io.cn"
source: hosted
version: "9.0.2+1"
version: "13.0.1"
permission_handler_apple:
dependency: transitive
description:
name: permission_handler_apple
sha256: "99e220bce3f8877c78e4ace901082fb29fa1b4ebde529ad0932d8d664b34f3f5"
sha256: f000131e755c54cf4d84a5d8bd6e4149e262cc31c5a8b1d698de1ac85fa41023
url: "https://pub.flutter-io.cn"
source: hosted
version: "9.4.7"
permission_handler_html:
dependency: transitive
description:
name: permission_handler_html
sha256: "38f000e83355abb3392140f6bc3030660cfaef189e1f87824facb76300b4ff24"
url: "https://pub.flutter-io.cn"
source: hosted
version: "9.1.4"
version: "0.1.3+5"
permission_handler_platform_interface:
dependency: transitive
description:
name: permission_handler_platform_interface
sha256: "6760eb5ef34589224771010805bea6054ad28453906936f843a8cc4d3a55c4a4"
sha256: eb99b295153abce5d683cac8c02e22faab63e50679b937fa1bf67d58bb282878
url: "https://pub.flutter-io.cn"
source: hosted
version: "3.12.0"
version: "4.3.0"
permission_handler_windows:
dependency: transitive
description:
name: permission_handler_windows
sha256: cc074aace208760f1eee6aa4fae766b45d947df85bc831cde77009cdb4720098
sha256: "1a790728016f79a41216d88672dbc5df30e686e811ad4e698bfc51f76ad91f1e"
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.1.3"
version: "0.2.1"
petitparser:
dependency: transitive
description:
......@@ -850,10 +802,10 @@ packages:
dependency: transitive
description:
name: rxdart
sha256: "0c7c0cedd93788d996e33041ffecda924cc54389199cde4e6a34b440f50044cb"
sha256: "5c3004a4a8dbb94bd4bf5412a4def4acdaa12e12f269737a5751369e12d1a962"
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.27.7"
version: "0.28.0"
shared_preferences:
dependency: transitive
description:
......@@ -1035,14 +987,6 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.4.0"
unique_identifier:
dependency: transitive
description:
name: unique_identifier
sha256: "3a2ecf55177017ba9b213cac5978785fde15b41cac40eb4efefc1a31f3aa41de"
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.3.0"
url_launcher:
dependency: transitive
description:
......@@ -1119,26 +1063,26 @@ packages:
dependency: transitive
description:
name: vector_graphics
sha256: "4ac59808bbfca6da38c99f415ff2d3a5d7ca0a6b4809c71d9cf30fba5daf9752"
sha256: "44cc7104ff32563122a929e4620cf3efd584194eec6d1d913eb5ba593dbcf6de"
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.1.10+1"
version: "1.1.18"
vector_graphics_codec:
dependency: transitive
description:
name: vector_graphics_codec
sha256: f3247e7ab0ec77dc759263e68394990edc608fb2b480b80db8aa86ed09279e33
sha256: "99fd9fbd34d9f9a32efd7b6a6aae14125d8237b10403b422a6a6dfeac2806146"
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.1.10+1"
version: "1.1.13"
vector_graphics_compiler:
dependency: transitive
description:
name: vector_graphics_compiler
sha256: "18489bdd8850de3dd7ca8a34e0c446f719ec63e2bab2e7a8cc66a9028dd76c5a"
sha256: "1b4b9e706a10294258727674a340ae0d6e64a7231980f9f9a3d12e4b42407aad"
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.1.10+1"
version: "1.1.16"
vector_math:
dependency: transitive
description:
......@@ -1199,10 +1143,18 @@ packages:
dependency: transitive
description:
name: win32
sha256: "5a751eddf9db89b3e5f9d50c20ab8612296e4e8db69009788d6c8b060a84191c"
sha256: daf97c9d80197ed7b619040e86c8ab9a9dad285e7671ee7390f9180cc828a51e
url: "https://pub.flutter-io.cn"
source: hosted
version: "5.10.1"
win32_registry:
dependency: transitive
description:
name: win32_registry
sha256: "21ec76dfc731550fd3e2ce7a33a9ea90b828fdf19a5c3bcf556fa992cfa99852"
url: "https://pub.flutter-io.cn"
source: hosted
version: "4.1.4"
version: "1.1.5"
xdg_directories:
dependency: transitive
description:
......
......@@ -6,7 +6,7 @@ description: Demonstrates how to use the account_center plugin.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
environment:
sdk: '>=2.18.2 <3.0.0'
sdk: ">=2.17.0 <4.0.0"
# Dependencies specify other packages that your package needs in order to work.
# To automatically upgrade your package dependencies to the latest versions
......@@ -29,16 +29,12 @@ dependencies:
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.2
uuid: ^4.2.2
flutter_clx_base:
git:
url: https://t.clxkj.cn/openSourceLibrary/flutter_clx_base.git
ref: v1.0.2
uuid: ^4.5.1
dependency_overrides:
package_info_plus: 3.1.2
ffi: 2.0.1
dev_dependencies:
flutter_test:
sdk: flutter
......
import 'dart:io';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter_clx_base/flutter_clx_base.dart';
import 'package:flutter_widget_from_html_core/flutter_widget_from_html_core.dart';
import 'package:open_filex/open_filex.dart';
import 'package:open_store/open_store.dart';
class UpdateDialog extends StatefulWidget {
final String? title;
final String? content;
final bool? isUpdateMore;
final String? versionPath;
final String versionNumber;
final Function()? onIgnore;
final String? bgPath;
final Color? mainColor;
final String? iosAppId;
const UpdateDialog(
{Key? key,
this.title,
this.content,
this.isUpdateMore,
this.versionPath,
this.onIgnore,
this.bgPath,
this.mainColor,
this.iosAppId,
required this.versionNumber})
: super(key: key);
@override
State<UpdateDialog> createState() => _UpdateDialogState();
}
class _UpdateDialogState extends State<UpdateDialog> {
final CancelToken _cancelToken = CancelToken();
bool _isDownloading = false;
final _value = 0.0.obs;
late Color primaryColor;
@override
void initState() {
super.initState();
}
@override
void dispose() {
if (!_cancelToken.isCancelled && _value.value != 1) {
_cancelToken.cancel();
}
super.dispose();
}
@override
Widget build(BuildContext context) {
primaryColor = widget.mainColor ?? Theme.of(context).primaryColor;
return WillPopScope(
onWillPop: () {
/// 使用false禁止返回键返回,达到强制升级目的
return Future.value(false);
},
child: Scaffold(
resizeToAvoidBottomInset: false,
backgroundColor: Colors.transparent,
body: Center(
child: Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(8.0),
),
width: 280.0,
child: Stack(
children: <Widget>[
Container(
height: 140.0,
width: 290.0,
decoration: BoxDecoration(
borderRadius: const BorderRadius.only(
topLeft: Radius.circular(8.0),
topRight: Radius.circular(8.0)),
image: DecorationImage(
image: AssetImage(widget.bgPath ?? ""),
fit: BoxFit.cover,
),
),
),
Column(
mainAxisSize: MainAxisSize.min,
children: [
Padding(
padding: const EdgeInsets.only(
left: 15.0, right: 15.0, top: 16.0),
child: Text(
widget.title!,
style: const TextStyle(
fontSize: 18.0, fontWeight: FontWeight.w600),
),
),
Padding(
padding: const EdgeInsets.symmetric(
horizontal: 15.0, vertical: 10.0),
child: HtmlWidget(widget.content!),
),
Padding(
padding: const EdgeInsets.only(
left: 15.0, right: 15.0, top: 5.0),
child: _isDownloading
? _progress(context, primaryColor)
: _buildButton(context),
),
],
),
],
)),
)),
);
}
Widget _installButton(BuildContext context) {
return Padding(
padding: const EdgeInsets.symmetric(vertical: 10, horizontal: 15),
child: GFButton(
color: primaryColor,
size: 40,
textStyle: const TextStyle(fontSize: 16.0),
fullWidthButton: true,
onPressed: () {
getAPkName().then((value) {
openApk(value ?? '');
});
},
text: '文件已下载,点击安装',
),
);
}
Obx _progress(BuildContext context, Color primaryColor) {
return Obx(() {
return Padding(
padding: const EdgeInsets.only(bottom: 15.0),
child: Column(
children: [
LinearProgressIndicator(
backgroundColor: Colors.grey,
valueColor: AlwaysStoppedAnimation<Color>(primaryColor),
value: _value.value,
),
vGap8,
Center(
child: Text('${(_value.value * 100).toInt()}%'),
)
],
),
);
});
}
///下载apk
Future<void> _download(String path) async {
try {
File file = File(path);
/// 链接可能会失效
await Dio().download(
widget.versionPath!,
file.path,
cancelToken: _cancelToken,
onReceiveProgress: (int count, int total) {
if (total != -1) {
_value.value = count / total;
if (count == total) {
Navigator.pop(context);
openApk(path);
}
}
},
);
} catch (e) {
ToastUtil.showToast('下载失败');
loggerNoStack.d(e);
setState(() {
_isDownloading = false;
});
}
}
Future<String?> getAPkName() async {
setInitDir(initStorageDir: true);
await DirectoryUtil.getInstance();
DirectoryUtil.createStorageDirSync(category: 'Download');
return DirectoryUtil.getStoragePath(
fileName: 'report_${widget.versionNumber}',
category: 'Download',
format: 'apk');
}
void _toUpdate() {
if (defaultTargetPlatform == TargetPlatform.iOS) {
Navigator.pop(context);
OpenStore.instance.open(appStoreId: widget.iosAppId ?? '');
} else if (defaultTargetPlatform == TargetPlatform.android) {
getAPkName().then((path) async {
setState(() {
_isDownloading = true;
});
await _download(path ?? '');
});
}
}
openApk(String path) async {
OpenResult openResult = await OpenFilex.open(path);
// final openResult = await OpenFile.open(path);
if (openResult.type == ResultType.error) {
ToastUtil.showToast(openResult.message);
} else if (openResult.type == ResultType.permissionDenied) {
ToastUtil.showToast("无权限");
} else if (openResult.type == ResultType.fileNotFound) {
ToastUtil.showToast("未发现文件");
} else if (openResult.type == ResultType.noAppToOpen) {
ToastUtil.showToast("无打开方式");
} else {
// ToastUtil.showToast(openResult.message);
}
}
Widget _buildButton(BuildContext context) {
return Column(
children: <Widget>[
GFButton(
color: primaryColor,
size: 40,
textStyle: const TextStyle(fontSize: 16.0),
fullWidthButton: true,
onPressed: () {
_toUpdate();
},
text: '立即更新',
),
Offstage(offstage: !widget.isUpdateMore!, child: vGap10),
Offstage(
offstage: widget.isUpdateMore!,
child: TextButton(
onPressed: () {
widget.onIgnore?.call();
Navigator.pop(context);
},
child: const Text(
'忽略此版本',
style: TextStyle(color: Color(0xFF666666), fontSize: 14.0),
),
),
),
],
);
}
}
// import 'dart:io';
//
// import 'package:flutter/foundation.dart';
// import 'package:flutter/material.dart';
// import 'package:flutter_clx_base/flutter_clx_base.dart';
// import 'package:flutter_widget_from_html_core/flutter_widget_from_html_core.dart';
// import 'package:getwidget/getwidget.dart';
// import 'package:open_filex/open_filex.dart';
// import 'package:open_store/open_store.dart';
//
// class UpdateDialog extends StatefulWidget {
// final String? title;
// final String? content;
// final bool? isUpdateMore;
// final String? versionPath;
// final String versionNumber;
// final Function()? onIgnore;
// final String? bgPath;
// final Color? mainColor;
// final String? iosAppId;
// const UpdateDialog(
// {Key? key,
// this.title,
// this.content,
// this.isUpdateMore,
// this.versionPath,
// this.onIgnore,
// this.bgPath,
// this.mainColor,
// this.iosAppId,
// required this.versionNumber})
// : super(key: key);
//
// @override
// State<UpdateDialog> createState() => _UpdateDialogState();
// }
//
// class _UpdateDialogState extends State<UpdateDialog> {
// final CancelToken _cancelToken = CancelToken();
// bool _isDownloading = false;
// final _value = 0.0.obs;
// late Color primaryColor;
//
// @override
// void initState() {
// super.initState();
// }
//
// @override
// void dispose() {
// if (!_cancelToken.isCancelled && _value.value != 1) {
// _cancelToken.cancel();
// }
// super.dispose();
// }
//
// @override
// Widget build(BuildContext context) {
// primaryColor = widget.mainColor ?? Theme.of(context).primaryColor;
// return WillPopScope(
// onWillPop: () {
// /// 使用false禁止返回键返回,达到强制升级目的
// return Future.value(false);
// },
// child: Scaffold(
// resizeToAvoidBottomInset: false,
// backgroundColor: Colors.transparent,
// body: Center(
// child: Container(
// decoration: BoxDecoration(
// color: Colors.white,
// borderRadius: BorderRadius.circular(8.0),
// ),
// width: 280.0,
// child: Stack(
// children: <Widget>[
// Container(
// height: 140.0,
// width: 290.0,
// decoration: BoxDecoration(
// borderRadius: const BorderRadius.only(
// topLeft: Radius.circular(8.0),
// topRight: Radius.circular(8.0)),
// image: DecorationImage(
// image: AssetImage(widget.bgPath ?? ""),
// fit: BoxFit.cover,
// ),
// ),
// ),
// Column(
// mainAxisSize: MainAxisSize.min,
// children: [
// Padding(
// padding: const EdgeInsets.only(
// left: 15.0, right: 15.0, top: 16.0),
// child: Text(
// widget.title!,
// style: const TextStyle(
// fontSize: 18.0, fontWeight: FontWeight.w600),
// ),
// ),
// Padding(
// padding: const EdgeInsets.symmetric(
// horizontal: 15.0, vertical: 10.0),
// child: HtmlWidget(widget.content!),
// ),
// Padding(
// padding: const EdgeInsets.only(
// left: 15.0, right: 15.0, top: 5.0),
// child: _isDownloading
// ? _progress(context, primaryColor)
// : _buildButton(context),
// ),
// ],
// ),
// ],
// )),
// )),
// );
// }
//
// Widget _installButton(BuildContext context) {
// return Padding(
// padding: const EdgeInsets.symmetric(vertical: 10, horizontal: 15),
// child: GFButton(
// color: primaryColor,
// size: 40,
// textStyle: const TextStyle(fontSize: 16.0),
// fullWidthButton: true,
// onPressed: () {
// getAPkName().then((value) {
// openApk(value ?? '');
// });
// },
// text: '文件已下载,点击安装',
// ),
// );
// }
//
// Obx _progress(BuildContext context, Color primaryColor) {
// return Obx(() {
// return Padding(
// padding: const EdgeInsets.only(bottom: 15.0),
// child: Column(
// children: [
// LinearProgressIndicator(
// backgroundColor: Colors.grey,
// valueColor: AlwaysStoppedAnimation<Color>(primaryColor),
// value: _value.value,
// ),
// vGap8,
// Center(
// child: Text('${(_value.value * 100).toInt()}%'),
// )
// ],
// ),
// );
// });
// }
//
// ///下载apk
// Future<void> _download(String path) async {
// try {
// File file = File(path);
//
// /// 链接可能会失效
// await Dio().download(
// widget.versionPath!,
// file.path,
// cancelToken: _cancelToken,
// onReceiveProgress: (int count, int total) {
// if (total != -1) {
// _value.value = count / total;
// if (count == total) {
// Navigator.pop(context);
// openApk(path);
// }
// }
// },
// );
// } catch (e) {
// ToastUtil.showToast('下载失败');
// loggerNoStack.d(e);
// setState(() {
// _isDownloading = false;
// });
// }
// }
//
// Future<String?> getAPkName() async {
// setInitDir(initStorageDir: true);
// await DirectoryUtil.getInstance();
// DirectoryUtil.createStorageDirSync(category: 'Download');
// return DirectoryUtil.getStoragePath(
// fileName: 'report_${widget.versionNumber}',
// category: 'Download',
// format: 'apk');
// }
//
// void _toUpdate() {
// if (defaultTargetPlatform == TargetPlatform.iOS) {
// Navigator.pop(context);
// OpenStore.instance.open(appStoreId: widget.iosAppId ?? '');
// } else if (defaultTargetPlatform == TargetPlatform.android) {
// getAPkName().then((path) async {
// setState(() {
// _isDownloading = true;
// });
// await _download(path ?? '');
// });
// }
// }
//
// openApk(String path) async {
// OpenResult openResult = await OpenFilex.open(path);
// // final openResult = await OpenFile.open(path);
// if (openResult.type == ResultType.error) {
// ToastUtil.showToast(openResult.message);
// } else if (openResult.type == ResultType.permissionDenied) {
// ToastUtil.showToast("无权限");
// } else if (openResult.type == ResultType.fileNotFound) {
// ToastUtil.showToast("未发现文件");
// } else if (openResult.type == ResultType.noAppToOpen) {
// ToastUtil.showToast("无打开方式");
// } else {
// // ToastUtil.showToast(openResult.message);
// }
// }
//
// Widget _buildButton(BuildContext context) {
// return Column(
// children: <Widget>[
// GFButton(
// color: primaryColor,
// size: 40,
// textStyle: const TextStyle(fontSize: 16.0),
// fullWidthButton: true,
// onPressed: () {
// _toUpdate();
// },
// text: '立即更新',
// ),
// Offstage(offstage: !widget.isUpdateMore!, child: vGap10),
// Offstage(
// offstage: widget.isUpdateMore!,
// child: TextButton(
// onPressed: () {
// widget.onIgnore?.call();
// Navigator.pop(context);
// },
// child: const Text(
// '忽略此版本',
// style: TextStyle(color: Color(0xFF666666), fontSize: 14.0),
// ),
// ),
// ),
// ],
// );
// }
// }
import 'dart:io';
import 'package:device_info/device_info.dart';
import 'package:device_info_plus/device_info_plus.dart';
class DeviceInfo {
String deviceId;
......@@ -29,7 +29,7 @@ class DeviceInfo {
// 根据 Android 设备信息创建 DeviceInfo 对象
factory DeviceInfo.fromAndroidDeviceInfo(AndroidDeviceInfo androidInfo) {
return DeviceInfo(
deviceId: androidInfo.androidId,
deviceId: androidInfo.serialNumber,
deviceName: androidInfo.model,
systemVersion: androidInfo.version.release,
brand: androidInfo.brand);
......@@ -38,7 +38,7 @@ class DeviceInfo {
// 根据 iOS 设备信息创建 DeviceInfo 对象
factory DeviceInfo.fromIosDeviceInfo(IosDeviceInfo iosInfo) {
return DeviceInfo(
deviceId: iosInfo.identifierForVendor,
deviceId: iosInfo.identifierForVendor ?? "",
deviceName: AppleDeviceModelMapper.getModelName(iosInfo.utsname.machine),
systemVersion: iosInfo.systemVersion,
);
......
import 'package:account_center/account_center.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter_clx_base/flutter_clx_base.dart';
import 'package:getwidget/getwidget.dart';
class CodeVerifyButton extends StatefulWidget {
final String text;
......
import 'package:account_center/account_center.dart';
import 'package:account_center/style/style_params.dart';
import 'package:account_center/widget/radio_check.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:getwidget/getwidget.dart';
/// 风格化控件,处理统一风格,和颜色
abstract class StyleWidget {
......
......@@ -4,7 +4,7 @@ import 'dart:io';
import 'package:account_center/widget/file_utils.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter_pdfview/flutter_pdfview.dart';
// import 'package:flutter_pdfview/flutter_pdfview.dart';
import 'package:path_provider/path_provider.dart';
class PdfPreview extends StatefulWidget {
......@@ -38,8 +38,8 @@ class _PdfPreviewState extends State<PdfPreview> {
return filePath == null
? const Center(
child: CircularProgressIndicator(),
)
: PDFView(filePath: filePath);
):SizedBox();
// : PDFView(filePath: filePath);
}
Future<File> createFileOfPdfUrl() async {
......
......@@ -10,33 +10,34 @@ environment:
dependencies:
flutter:
sdk: flutter
device_info: ^2.0.0
flutter_svg: ^2.0.6
external_path: ^1.0.3
file_picker: ^5.3.1
url_launcher: ^6.1.2
device_info_plus: ^11.2.2
flutter_svg: ^2.1.0
external_path: ^2.2.0
file_picker: 10.3.2
url_launcher: ^6.3.1
# 打开文件
open_filex: ^4.3.2
flutter_widget_from_html_core: ^0.10.1
open_filex: ^4.7.0
flutter_widget_from_html_core: ^0.16.1
open_store: ^0.5.0
connectivity_plus: ^5.0.2
flutter_pdfview: 1.4.0
connectivity_plus: ^6.1.5
# flutter_pdfview: 1.4.3
flutter_oss_aliyun: ^6.4.2
aliyun_face_plugin:
git:
url: https://dev:devfortesting@t.clxkj.cn/openSourceLibrary/aliyun_face_plugin.git
ref: v1.0.4
ref: v1.0.4-flutter-3.24.5
flutter_clx_base:
git:
url: https://t.clxkj.cn/openSourceLibrary/flutter_clx_base.git
ref: v1.0.3_3.24.5
getwidget: ^7.0.0
dependency_overrides:
ffi: 2.0.1
dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^3.0.1
flutter_clx_base:
git:
url: https://t.clxkj.cn/openSourceLibrary/flutter_clx_base.git
ref: v1.0.2
flutter:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论