Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f96dee06f9 | ||
|
|
7b1da5568b | ||
|
|
25b8692504 | ||
|
|
28e3cfc77a | ||
|
|
cb7c1c9dd4 | ||
|
|
08d697856a | ||
|
|
fce4e559fd | ||
|
|
bb88863825 | ||
|
|
bf8461b992 | ||
|
|
0fcc9efa84 | ||
|
|
78f429e0af | ||
|
|
811a89e97f | ||
|
|
426150f8a7 | ||
|
|
b120d2e8e4 | ||
|
|
ebfb25212a | ||
|
|
2d39a93c0b | ||
|
|
ea1ec2c3bf | ||
|
|
419c614ba4 | ||
|
|
8660f34617 | ||
|
|
0a5c013060 | ||
|
|
1969f3e142 | ||
|
|
c49207e0d1 | ||
|
|
bfb8284bf0 | ||
|
|
99cce09b19 | ||
|
|
67896aef90 | ||
|
|
840a7145ce | ||
|
|
947b2f479d | ||
|
|
16cab1dcae | ||
|
|
26d6b4aa3f | ||
|
|
538dc3e6c5 | ||
|
|
c2660b5e22 | ||
|
|
c38bfd7224 | ||
|
|
b6a6d474d9 | ||
|
|
1a421ba40b | ||
|
|
e1152b0274 |
@@ -1,4 +1,3 @@
|
|||||||
{
|
{
|
||||||
"flutterSdkVersion": "1.22.6",
|
"flutterSdkVersion": "1.22.6"
|
||||||
"flavors": {}
|
|
||||||
}
|
}
|
||||||
@@ -30,7 +30,6 @@
|
|||||||
.pub-cache/
|
.pub-cache/
|
||||||
.pub/
|
.pub/
|
||||||
/build/
|
/build/
|
||||||
.fvm/flutter_sdk
|
|
||||||
android/app/release/app-release.apk
|
android/app/release/app-release.apk
|
||||||
android/app/release/output.json
|
android/app/release/output.json
|
||||||
pubspec.lock
|
pubspec.lock
|
||||||
@@ -44,3 +43,6 @@ app.*.symbols
|
|||||||
# Obfuscation related
|
# Obfuscation related
|
||||||
app.*.map.json
|
app.*.map.json
|
||||||
ios/fastlane/report.xml
|
ios/fastlane/report.xml
|
||||||
|
|
||||||
|
# FVM Version Cache
|
||||||
|
.fvm/
|
||||||
@@ -1,11 +1,9 @@
|
|||||||
{
|
{
|
||||||
"dart.flutterSdkPath": ".fvm/flutter_sdk",
|
"dart.flutterSdkPath": ".fvm/versions/1.22.6",
|
||||||
// Remove .fvm files from search
|
"search.exclude": {
|
||||||
"search.exclude": {
|
"**/.fvm": true
|
||||||
"**/.fvm": true
|
},
|
||||||
},
|
"files.watcherExclude": {
|
||||||
// Remove from file watching
|
"**/.fvm": true
|
||||||
"files.watcherExclude": {
|
}
|
||||||
"**/.fvm": true
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -41,6 +41,9 @@ android {
|
|||||||
targetSdkVersion 29
|
targetSdkVersion 29
|
||||||
versionCode flutterVersionCode.toInteger()
|
versionCode flutterVersionCode.toInteger()
|
||||||
versionName flutterVersionName
|
versionName flutterVersionName
|
||||||
|
ndk {
|
||||||
|
abiFilters "arm64-v8a", "armeabi", "armeabi-v7a", "mips" // 不支持"x86", "x86_64"模拟器
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":20220620,"versionName":"1.5.3","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}]
|
[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":20250521,"versionName":"1.6.4","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}]
|
||||||
@@ -36,6 +36,9 @@
|
|||||||
<!-- 请求忽略电池优化,用于后台定时提醒等 -->
|
<!-- 请求忽略电池优化,用于后台定时提醒等 -->
|
||||||
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS"/>
|
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS"/>
|
||||||
|
|
||||||
|
<!-- Permissions options for the `location` group -->
|
||||||
|
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
||||||
|
|
||||||
<application
|
<application
|
||||||
android:name="com.flutter.hyzp_ybqx.MyApplication"
|
android:name="com.flutter.hyzp_ybqx.MyApplication"
|
||||||
android:icon="@mipmap/ic_launcher"
|
android:icon="@mipmap/ic_launcher"
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ buildscript {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:3.5.0'
|
classpath 'com.android.tools.build:gradle:3.5.4'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,3 +2,4 @@ org.gradle.jvmargs=-Xmx1536M
|
|||||||
android.useAndroidX=true
|
android.useAndroidX=true
|
||||||
android.enableJetifier=true
|
android.enableJetifier=true
|
||||||
android.enableR8=true
|
android.enableR8=true
|
||||||
|
org.gradle.java.home=c:\\Users\\WinUser01\\.jdks\\jbr_11.0.15_2022-04-19
|
||||||
|
|||||||
|
After Width: | Height: | Size: 4.0 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 3.0 KiB |
|
After Width: | Height: | Size: 4.4 KiB |
|
After Width: | Height: | Size: 4.6 KiB |
@@ -1,43 +1,47 @@
|
|||||||
GEM
|
GEM
|
||||||
remote: https://rubygems.org/
|
remote: https://rubygems.org/
|
||||||
specs:
|
specs:
|
||||||
CFPropertyList (3.0.5)
|
CFPropertyList (3.0.7)
|
||||||
|
base64
|
||||||
|
nkf
|
||||||
rexml
|
rexml
|
||||||
addressable (2.8.1)
|
addressable (2.8.7)
|
||||||
public_suffix (>= 2.0.2, < 6.0)
|
public_suffix (>= 2.0.2, < 7.0)
|
||||||
artifactory (3.0.15)
|
artifactory (3.0.17)
|
||||||
atomos (0.1.3)
|
atomos (0.1.3)
|
||||||
aws-eventstream (1.2.0)
|
aws-eventstream (1.4.0)
|
||||||
aws-partitions (1.665.0)
|
aws-partitions (1.1110.0)
|
||||||
aws-sdk-core (3.168.1)
|
aws-sdk-core (3.225.0)
|
||||||
aws-eventstream (~> 1, >= 1.0.2)
|
aws-eventstream (~> 1, >= 1.3.0)
|
||||||
aws-partitions (~> 1, >= 1.651.0)
|
aws-partitions (~> 1, >= 1.992.0)
|
||||||
aws-sigv4 (~> 1.5)
|
aws-sigv4 (~> 1.9)
|
||||||
|
base64
|
||||||
jmespath (~> 1, >= 1.6.1)
|
jmespath (~> 1, >= 1.6.1)
|
||||||
aws-sdk-kms (1.59.0)
|
logger
|
||||||
aws-sdk-core (~> 3, >= 3.165.0)
|
aws-sdk-kms (1.102.0)
|
||||||
aws-sigv4 (~> 1.1)
|
aws-sdk-core (~> 3, >= 3.225.0)
|
||||||
aws-sdk-s3 (1.117.1)
|
aws-sigv4 (~> 1.5)
|
||||||
aws-sdk-core (~> 3, >= 3.165.0)
|
aws-sdk-s3 (1.189.0)
|
||||||
|
aws-sdk-core (~> 3, >= 3.225.0)
|
||||||
aws-sdk-kms (~> 1)
|
aws-sdk-kms (~> 1)
|
||||||
aws-sigv4 (~> 1.4)
|
aws-sigv4 (~> 1.5)
|
||||||
aws-sigv4 (1.5.2)
|
aws-sigv4 (1.12.0)
|
||||||
aws-eventstream (~> 1, >= 1.0.2)
|
aws-eventstream (~> 1, >= 1.0.2)
|
||||||
babosa (1.0.4)
|
babosa (1.0.4)
|
||||||
|
base64 (0.3.0)
|
||||||
claide (1.1.0)
|
claide (1.1.0)
|
||||||
colored (1.2)
|
colored (1.2)
|
||||||
colored2 (3.1.2)
|
colored2 (3.1.2)
|
||||||
commander (4.6.0)
|
commander (4.6.0)
|
||||||
highline (~> 2.0.0)
|
highline (~> 2.0.0)
|
||||||
declarative (0.0.20)
|
declarative (0.0.20)
|
||||||
digest-crc (0.6.4)
|
digest-crc (0.7.0)
|
||||||
rake (>= 12.0.0, < 14.0.0)
|
rake (>= 12.0.0, < 14.0.0)
|
||||||
domain_name (0.5.20190701)
|
domain_name (0.6.20240107)
|
||||||
unf (>= 0.0.5, < 1.0.0)
|
|
||||||
dotenv (2.8.1)
|
dotenv (2.8.1)
|
||||||
emoji_regex (3.2.3)
|
emoji_regex (3.2.3)
|
||||||
excon (0.94.0)
|
excon (0.112.0)
|
||||||
faraday (1.10.2)
|
faraday (1.10.4)
|
||||||
faraday-em_http (~> 1.0)
|
faraday-em_http (~> 1.0)
|
||||||
faraday-em_synchrony (~> 1.0)
|
faraday-em_synchrony (~> 1.0)
|
||||||
faraday-excon (~> 1.1)
|
faraday-excon (~> 1.1)
|
||||||
@@ -56,24 +60,24 @@ GEM
|
|||||||
faraday-em_synchrony (1.0.0)
|
faraday-em_synchrony (1.0.0)
|
||||||
faraday-excon (1.1.0)
|
faraday-excon (1.1.0)
|
||||||
faraday-httpclient (1.0.1)
|
faraday-httpclient (1.0.1)
|
||||||
faraday-multipart (1.0.4)
|
faraday-multipart (1.1.0)
|
||||||
multipart-post (~> 2)
|
multipart-post (~> 2.0)
|
||||||
faraday-net_http (1.0.1)
|
faraday-net_http (1.0.2)
|
||||||
faraday-net_http_persistent (1.2.0)
|
faraday-net_http_persistent (1.2.0)
|
||||||
faraday-patron (1.0.0)
|
faraday-patron (1.0.0)
|
||||||
faraday-rack (1.0.0)
|
faraday-rack (1.0.0)
|
||||||
faraday-retry (1.0.3)
|
faraday-retry (1.0.3)
|
||||||
faraday_middleware (1.2.0)
|
faraday_middleware (1.2.1)
|
||||||
faraday (~> 1.0)
|
faraday (~> 1.0)
|
||||||
fastimage (2.2.6)
|
fastimage (2.4.0)
|
||||||
fastlane (2.211.0)
|
fastlane (2.227.2)
|
||||||
CFPropertyList (>= 2.3, < 4.0.0)
|
CFPropertyList (>= 2.3, < 4.0.0)
|
||||||
addressable (>= 2.8, < 3.0.0)
|
addressable (>= 2.8, < 3.0.0)
|
||||||
artifactory (~> 3.0)
|
artifactory (~> 3.0)
|
||||||
aws-sdk-s3 (~> 1.0)
|
aws-sdk-s3 (~> 1.0)
|
||||||
babosa (>= 1.0.3, < 2.0.0)
|
babosa (>= 1.0.3, < 2.0.0)
|
||||||
bundler (>= 1.12.0, < 3.0.0)
|
bundler (>= 1.12.0, < 3.0.0)
|
||||||
colored
|
colored (~> 1.2)
|
||||||
commander (~> 4.6)
|
commander (~> 4.6)
|
||||||
dotenv (>= 2.1.1, < 3.0.0)
|
dotenv (>= 2.1.1, < 3.0.0)
|
||||||
emoji_regex (>= 0.1, < 4.0)
|
emoji_regex (>= 0.1, < 4.0)
|
||||||
@@ -82,34 +86,39 @@ GEM
|
|||||||
faraday-cookie_jar (~> 0.0.6)
|
faraday-cookie_jar (~> 0.0.6)
|
||||||
faraday_middleware (~> 1.0)
|
faraday_middleware (~> 1.0)
|
||||||
fastimage (>= 2.1.0, < 3.0.0)
|
fastimage (>= 2.1.0, < 3.0.0)
|
||||||
|
fastlane-sirp (>= 1.0.0)
|
||||||
gh_inspector (>= 1.1.2, < 2.0.0)
|
gh_inspector (>= 1.1.2, < 2.0.0)
|
||||||
google-apis-androidpublisher_v3 (~> 0.3)
|
google-apis-androidpublisher_v3 (~> 0.3)
|
||||||
google-apis-playcustomapp_v1 (~> 0.1)
|
google-apis-playcustomapp_v1 (~> 0.1)
|
||||||
|
google-cloud-env (>= 1.6.0, < 2.0.0)
|
||||||
google-cloud-storage (~> 1.31)
|
google-cloud-storage (~> 1.31)
|
||||||
highline (~> 2.0)
|
highline (~> 2.0)
|
||||||
|
http-cookie (~> 1.0.5)
|
||||||
json (< 3.0.0)
|
json (< 3.0.0)
|
||||||
jwt (>= 2.1.0, < 3)
|
jwt (>= 2.1.0, < 3)
|
||||||
mini_magick (>= 4.9.4, < 5.0.0)
|
mini_magick (>= 4.9.4, < 5.0.0)
|
||||||
multipart-post (~> 2.0.0)
|
multipart-post (>= 2.0.0, < 3.0.0)
|
||||||
naturally (~> 2.2)
|
naturally (~> 2.2)
|
||||||
optparse (~> 0.1.1)
|
optparse (>= 0.1.1, < 1.0.0)
|
||||||
plist (>= 3.1.0, < 4.0.0)
|
plist (>= 3.1.0, < 4.0.0)
|
||||||
rubyzip (>= 2.0.0, < 3.0.0)
|
rubyzip (>= 2.0.0, < 3.0.0)
|
||||||
security (= 0.1.3)
|
security (= 0.1.5)
|
||||||
simctl (~> 1.6.3)
|
simctl (~> 1.6.3)
|
||||||
terminal-notifier (>= 2.0.0, < 3.0.0)
|
terminal-notifier (>= 2.0.0, < 3.0.0)
|
||||||
terminal-table (>= 1.4.5, < 2.0.0)
|
terminal-table (~> 3)
|
||||||
tty-screen (>= 0.6.3, < 1.0.0)
|
tty-screen (>= 0.6.3, < 1.0.0)
|
||||||
tty-spinner (>= 0.8.0, < 1.0.0)
|
tty-spinner (>= 0.8.0, < 1.0.0)
|
||||||
word_wrap (~> 1.0.0)
|
word_wrap (~> 1.0.0)
|
||||||
xcodeproj (>= 1.13.0, < 2.0.0)
|
xcodeproj (>= 1.13.0, < 2.0.0)
|
||||||
xcpretty (~> 0.3.0)
|
xcpretty (~> 0.4.1)
|
||||||
xcpretty-travis-formatter (>= 0.0.3)
|
xcpretty-travis-formatter (>= 0.0.3, < 2.0.0)
|
||||||
fastlane-plugin-versioning (0.5.0)
|
fastlane-plugin-versioning (0.5.0)
|
||||||
|
fastlane-sirp (1.0.0)
|
||||||
|
sysrandom (~> 1.0)
|
||||||
gh_inspector (1.1.3)
|
gh_inspector (1.1.3)
|
||||||
google-apis-androidpublisher_v3 (0.31.0)
|
google-apis-androidpublisher_v3 (0.54.0)
|
||||||
google-apis-core (>= 0.9.1, < 2.a)
|
google-apis-core (>= 0.11.0, < 2.a)
|
||||||
google-apis-core (0.9.1)
|
google-apis-core (0.11.3)
|
||||||
addressable (~> 2.5, >= 2.5.1)
|
addressable (~> 2.5, >= 2.5.1)
|
||||||
googleauth (>= 0.16.2, < 2.a)
|
googleauth (>= 0.16.2, < 2.a)
|
||||||
httpclient (>= 2.8.1, < 3.a)
|
httpclient (>= 2.8.1, < 3.a)
|
||||||
@@ -117,95 +126,94 @@ GEM
|
|||||||
representable (~> 3.0)
|
representable (~> 3.0)
|
||||||
retriable (>= 2.0, < 4.a)
|
retriable (>= 2.0, < 4.a)
|
||||||
rexml
|
rexml
|
||||||
webrick
|
google-apis-iamcredentials_v1 (0.17.0)
|
||||||
google-apis-iamcredentials_v1 (0.16.0)
|
google-apis-core (>= 0.11.0, < 2.a)
|
||||||
google-apis-core (>= 0.9.1, < 2.a)
|
google-apis-playcustomapp_v1 (0.13.0)
|
||||||
google-apis-playcustomapp_v1 (0.12.0)
|
google-apis-core (>= 0.11.0, < 2.a)
|
||||||
google-apis-core (>= 0.9.1, < 2.a)
|
google-apis-storage_v1 (0.31.0)
|
||||||
google-apis-storage_v1 (0.19.0)
|
google-apis-core (>= 0.11.0, < 2.a)
|
||||||
google-apis-core (>= 0.9.0, < 2.a)
|
google-cloud-core (1.7.1)
|
||||||
google-cloud-core (1.6.0)
|
google-cloud-env (>= 1.0, < 3.a)
|
||||||
google-cloud-env (~> 1.0)
|
|
||||||
google-cloud-errors (~> 1.0)
|
google-cloud-errors (~> 1.0)
|
||||||
google-cloud-env (1.6.0)
|
google-cloud-env (1.6.0)
|
||||||
faraday (>= 0.17.3, < 3.0)
|
faraday (>= 0.17.3, < 3.0)
|
||||||
google-cloud-errors (1.3.0)
|
google-cloud-errors (1.4.0)
|
||||||
google-cloud-storage (1.44.0)
|
google-cloud-storage (1.47.0)
|
||||||
addressable (~> 2.8)
|
addressable (~> 2.8)
|
||||||
digest-crc (~> 0.4)
|
digest-crc (~> 0.4)
|
||||||
google-apis-iamcredentials_v1 (~> 0.1)
|
google-apis-iamcredentials_v1 (~> 0.1)
|
||||||
google-apis-storage_v1 (~> 0.19.0)
|
google-apis-storage_v1 (~> 0.31.0)
|
||||||
google-cloud-core (~> 1.6)
|
google-cloud-core (~> 1.6)
|
||||||
googleauth (>= 0.16.2, < 2.a)
|
googleauth (>= 0.16.2, < 2.a)
|
||||||
mini_mime (~> 1.0)
|
mini_mime (~> 1.0)
|
||||||
googleauth (1.3.0)
|
googleauth (1.8.1)
|
||||||
faraday (>= 0.17.3, < 3.a)
|
faraday (>= 0.17.3, < 3.a)
|
||||||
jwt (>= 1.4, < 3.0)
|
jwt (>= 1.4, < 3.0)
|
||||||
memoist (~> 0.16)
|
|
||||||
multi_json (~> 1.11)
|
multi_json (~> 1.11)
|
||||||
os (>= 0.9, < 2.0)
|
os (>= 0.9, < 2.0)
|
||||||
signet (>= 0.16, < 2.a)
|
signet (>= 0.16, < 2.a)
|
||||||
highline (2.0.3)
|
highline (2.0.3)
|
||||||
http-cookie (1.0.5)
|
http-cookie (1.0.8)
|
||||||
domain_name (~> 0.5)
|
domain_name (~> 0.5)
|
||||||
httpclient (2.8.3)
|
httpclient (2.9.0)
|
||||||
|
mutex_m
|
||||||
jmespath (1.6.2)
|
jmespath (1.6.2)
|
||||||
json (2.6.2)
|
json (2.12.2)
|
||||||
jwt (2.5.0)
|
jwt (2.10.1)
|
||||||
memoist (0.16.2)
|
base64
|
||||||
mini_magick (4.11.0)
|
logger (1.7.0)
|
||||||
mini_mime (1.1.2)
|
mini_magick (4.13.2)
|
||||||
|
mini_mime (1.1.5)
|
||||||
multi_json (1.15.0)
|
multi_json (1.15.0)
|
||||||
multipart-post (2.0.0)
|
multipart-post (2.4.1)
|
||||||
nanaimo (0.3.0)
|
mutex_m (0.3.0)
|
||||||
|
nanaimo (0.4.0)
|
||||||
naturally (2.2.1)
|
naturally (2.2.1)
|
||||||
optparse (0.1.1)
|
nkf (0.2.0)
|
||||||
|
optparse (0.6.0)
|
||||||
os (1.1.4)
|
os (1.1.4)
|
||||||
plist (3.6.0)
|
plist (3.7.2)
|
||||||
public_suffix (5.0.0)
|
public_suffix (5.1.1)
|
||||||
rake (13.0.6)
|
rake (13.3.0)
|
||||||
representable (3.2.0)
|
representable (3.2.0)
|
||||||
declarative (< 0.1.0)
|
declarative (< 0.1.0)
|
||||||
trailblazer-option (>= 0.1.1, < 0.2.0)
|
trailblazer-option (>= 0.1.1, < 0.2.0)
|
||||||
uber (< 0.2.0)
|
uber (< 0.2.0)
|
||||||
retriable (3.1.2)
|
retriable (3.1.2)
|
||||||
rexml (3.2.5)
|
rexml (3.4.1)
|
||||||
rouge (2.0.7)
|
rouge (3.28.0)
|
||||||
ruby2_keywords (0.0.5)
|
ruby2_keywords (0.0.5)
|
||||||
rubyzip (2.3.2)
|
rubyzip (2.4.1)
|
||||||
security (0.1.3)
|
security (0.1.5)
|
||||||
signet (0.17.0)
|
signet (0.19.0)
|
||||||
addressable (~> 2.8)
|
addressable (~> 2.8)
|
||||||
faraday (>= 0.17.5, < 3.a)
|
faraday (>= 0.17.5, < 3.a)
|
||||||
jwt (>= 1.5, < 3.0)
|
jwt (>= 1.5, < 3.0)
|
||||||
multi_json (~> 1.10)
|
multi_json (~> 1.10)
|
||||||
simctl (1.6.8)
|
simctl (1.6.10)
|
||||||
CFPropertyList
|
CFPropertyList
|
||||||
naturally
|
naturally
|
||||||
|
sysrandom (1.0.5)
|
||||||
terminal-notifier (2.0.0)
|
terminal-notifier (2.0.0)
|
||||||
terminal-table (1.8.0)
|
terminal-table (3.0.2)
|
||||||
unicode-display_width (~> 1.1, >= 1.1.1)
|
unicode-display_width (>= 1.1.1, < 3)
|
||||||
trailblazer-option (0.1.2)
|
trailblazer-option (0.1.2)
|
||||||
tty-cursor (0.7.1)
|
tty-cursor (0.7.1)
|
||||||
tty-screen (0.8.1)
|
tty-screen (0.8.2)
|
||||||
tty-spinner (0.9.3)
|
tty-spinner (0.9.3)
|
||||||
tty-cursor (~> 0.7)
|
tty-cursor (~> 0.7)
|
||||||
uber (0.1.0)
|
uber (0.1.0)
|
||||||
unf (0.1.4)
|
unicode-display_width (2.6.0)
|
||||||
unf_ext
|
|
||||||
unf_ext (0.0.8.2)
|
|
||||||
unicode-display_width (1.8.0)
|
|
||||||
webrick (1.7.0)
|
|
||||||
word_wrap (1.0.0)
|
word_wrap (1.0.0)
|
||||||
xcodeproj (1.22.0)
|
xcodeproj (1.27.0)
|
||||||
CFPropertyList (>= 2.3.3, < 4.0)
|
CFPropertyList (>= 2.3.3, < 4.0)
|
||||||
atomos (~> 0.1.3)
|
atomos (~> 0.1.3)
|
||||||
claide (>= 1.0.2, < 2.0)
|
claide (>= 1.0.2, < 2.0)
|
||||||
colored2 (~> 3.1)
|
colored2 (~> 3.1)
|
||||||
nanaimo (~> 0.3.0)
|
nanaimo (~> 0.4.0)
|
||||||
rexml (~> 3.2.4)
|
rexml (>= 3.3.6, < 4.0)
|
||||||
xcpretty (0.3.0)
|
xcpretty (0.4.1)
|
||||||
rouge (~> 2.0.7)
|
rouge (~> 3.28.0)
|
||||||
xcpretty-travis-formatter (1.0.1)
|
xcpretty-travis-formatter (1.0.1)
|
||||||
xcpretty (~> 0.2, >= 0.0.7)
|
xcpretty (~> 0.2, >= 0.0.7)
|
||||||
|
|
||||||
|
|||||||
@@ -66,6 +66,8 @@ PODS:
|
|||||||
- FMDB/standard (2.7.5)
|
- FMDB/standard (2.7.5)
|
||||||
- image_picker (0.0.1):
|
- image_picker (0.0.1):
|
||||||
- Flutter
|
- Flutter
|
||||||
|
- map_launcher (0.0.1):
|
||||||
|
- Flutter
|
||||||
- Masonry (1.1.0)
|
- Masonry (1.1.0)
|
||||||
- open_file (0.0.1):
|
- open_file (0.0.1):
|
||||||
- Flutter
|
- Flutter
|
||||||
@@ -108,6 +110,7 @@ DEPENDENCIES:
|
|||||||
- flutter_superplayer (from `.symlinks/plugins/flutter_superplayer/ios`)
|
- flutter_superplayer (from `.symlinks/plugins/flutter_superplayer/ios`)
|
||||||
- fluttertoast (from `.symlinks/plugins/fluttertoast/ios`)
|
- fluttertoast (from `.symlinks/plugins/fluttertoast/ios`)
|
||||||
- image_picker (from `.symlinks/plugins/image_picker/ios`)
|
- image_picker (from `.symlinks/plugins/image_picker/ios`)
|
||||||
|
- map_launcher (from `.symlinks/plugins/map_launcher/ios`)
|
||||||
- open_file (from `.symlinks/plugins/open_file/ios`)
|
- open_file (from `.symlinks/plugins/open_file/ios`)
|
||||||
- package_info (from `.symlinks/plugins/package_info/ios`)
|
- package_info (from `.symlinks/plugins/package_info/ios`)
|
||||||
- path_provider (from `.symlinks/plugins/path_provider/ios`)
|
- path_provider (from `.symlinks/plugins/path_provider/ios`)
|
||||||
@@ -164,6 +167,8 @@ EXTERNAL SOURCES:
|
|||||||
:path: ".symlinks/plugins/fluttertoast/ios"
|
:path: ".symlinks/plugins/fluttertoast/ios"
|
||||||
image_picker:
|
image_picker:
|
||||||
:path: ".symlinks/plugins/image_picker/ios"
|
:path: ".symlinks/plugins/image_picker/ios"
|
||||||
|
map_launcher:
|
||||||
|
:path: ".symlinks/plugins/map_launcher/ios"
|
||||||
open_file:
|
open_file:
|
||||||
:path: ".symlinks/plugins/open_file/ios"
|
:path: ".symlinks/plugins/open_file/ios"
|
||||||
package_info:
|
package_info:
|
||||||
@@ -182,40 +187,41 @@ EXTERNAL SOURCES:
|
|||||||
:path: ".symlinks/plugins/webview_flutter/ios"
|
:path: ".symlinks/plugins/webview_flutter/ios"
|
||||||
|
|
||||||
SPEC CHECKSUMS:
|
SPEC CHECKSUMS:
|
||||||
AFNetworking: 7864c38297c79aaca1500c33288e429c3451fdce
|
AFNetworking: 3bd23d814e976cd148d7d44c3ab78017b744cd58
|
||||||
android_power_manager: c35cabf2188eaf836e8b4f2f4bad9aaa876d2f93
|
android_power_manager: f4c55446e089d4e7efce3c4f7f9e6e2d59bf7dff
|
||||||
app_installer: 6c31be407728fb6d67cce038fd8547e563e6982c
|
app_installer: 3de16a106f56b77eca43eece1ed723202b22dc52
|
||||||
audioplayers: 53f0f30789b10ab2009771c6c79def00980945e4
|
audioplayers: 2de44c6cb9d765742830def08bf60d8f6e859ae7
|
||||||
BaiduMapKit: 40a4382633859bd569d40da9f9a2e98a277dd28b
|
BaiduMapKit: 40a4382633859bd569d40da9f9a2e98a277dd28b
|
||||||
BIJKPlayer: 4c5d66e5cb99ae5bade6f22a4fcc031722a81c64
|
BIJKPlayer: 4c5d66e5cb99ae5bade6f22a4fcc031722a81c64
|
||||||
camera: a0ca5080336f7af47b88436e5e26da3dee5568f0
|
camera: 299a04dd889d65397e64c94545796e60aabb11ab
|
||||||
city_pickers: b0370f4c35c201723b5b7fcce10ec29b59d5bc35
|
city_pickers: 411a41e68eab0fa2f078317a9971cd454f4c9da4
|
||||||
device_info: d7d233b645a32c40dfdc212de5cf646ca482f175
|
device_info: 52e8c0c9c61def8d0a92bf175f5f500abbea04bc
|
||||||
disable_screenshots: 3f3a1881efa341fcdad395fb2b25e11a9a7bce0b
|
disable_screenshots: 20150b02b804ce1f3f10e3b1e6f088e3134eee90
|
||||||
fijkplayer: 0d3793a2822d030ef5bba77f904bff1f7a91a115
|
fijkplayer: 5db7b07d644d06584c3629f20f697909c7ec9eff
|
||||||
Flutter: 0e3d915762c693b495b44d77113d4970485de6ec
|
Flutter: 0e3d915762c693b495b44d77113d4970485de6ec
|
||||||
flutter_background_service: a4644870cc76287aaa6147b47107e52680b79c90
|
flutter_background_service: cd346960455b6e2315353addac6bedc5a298346c
|
||||||
flutter_bmfbase: 8ac2c94f3f110daec8e499dc13f8a983b0c8ee40
|
flutter_bmfbase: 4e95fc35604042ba54f91c5bbaeacb4a4f853164
|
||||||
flutter_bmfmap: 57030919b16b5353649fbea77b6143129f7a4ff1
|
flutter_bmfmap: 13f91b61ddc184c4fbfc12f3d75977aa64248e25
|
||||||
flutter_bmfutils: 41b6af33c5e7d5d5f841ef9087fbd271c05b1961
|
flutter_bmfutils: 4a3aec04ee00cf35d11e33027c485a7f7e9140d0
|
||||||
flutter_downloader: 058b9c41564a90500f67f3e432e3524613a7fd83
|
flutter_downloader: d7c6d679fbc9a65d9094db7d9d562ee7a155f22e
|
||||||
flutter_drag_scale: 545fd546a1e968bd965883f0511b1c47f049f37d
|
flutter_drag_scale: 8db5da666c6fda0621291339c31dc45562312860
|
||||||
flutter_superplayer: d776c28859e3e6c17821ab7973c1fd374f4f546f
|
flutter_superplayer: b46df51c000f4ae28da52ba8e07d3bf094500327
|
||||||
fluttertoast: b644586ef3b16f67fae9a1f8754cef6b2d6b634b
|
fluttertoast: df9ba425182e58aa231106c563bffa08c0253471
|
||||||
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
|
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
|
||||||
image_picker: 9c3312491f862b28d21ecd8fdf0ee14e601b3f09
|
image_picker: 1c50c15f268eac05df9884b7a57b157a7e5d7fb5
|
||||||
|
map_launcher: b429f5dc548985f011d7c840f269cd2ee3b5d45e
|
||||||
Masonry: 678fab65091a9290e40e2832a55e7ab731aad201
|
Masonry: 678fab65091a9290e40e2832a55e7ab731aad201
|
||||||
open_file: 02eb5cb6b21264bd3a696876f5afbfb7ca4f4b7d
|
open_file: 898f23092cb034fda4ae3b268d782fe25d525e6b
|
||||||
package_info: 873975fc26034f0b863a300ad47e7f1ac6c7ec62
|
package_info: cce50adca9873c79f931618469d2114b91d71189
|
||||||
path_provider: abfe2b5c733d04e238b0d8691db0cfd63a27a93c
|
path_provider: 961ce7cdf0cba062c2f6ac640bcd96d310ec8645
|
||||||
permission_handler: ccb20a9fad0ee9b1314a52b70b76b473c5f8dab0
|
permission_handler: a6eb0c0a10e733fc3e1dcea4e2d426beb7c91064
|
||||||
SDWebImage: a7f831e1a65eb5e285e3fb046a23fcfbf08e696d
|
SDWebImage: a7f831e1a65eb5e285e3fb046a23fcfbf08e696d
|
||||||
shared_preferences: af6bfa751691cdc24be3045c43ec037377ada40d
|
shared_preferences: 47eaded4d5dc0bb45e04e66ce0b93ce876aff8a1
|
||||||
sqflite: 6d358c025f5b867b29ed92fc697fd34924e11904
|
sqflite: 954affaf2567c73cda074440299a625e3b2cbf8a
|
||||||
TXLiteAVSDK_Professional: 645670c9d1bbabb88e8dff998fb097a22fe71208
|
TXLiteAVSDK_Professional: 645670c9d1bbabb88e8dff998fb097a22fe71208
|
||||||
url_launcher: 6fef411d543ceb26efce54b05a0a40bfd74cbbef
|
url_launcher: 57d0ad20ca4ccf92256bb343ea186dbcf76fc042
|
||||||
webview_flutter: d2b4d6c66968ad042ad94cbb791f5b72b4678a96
|
webview_flutter: 2035f13e34d76c8126e9bb6b893a0c050b2999b8
|
||||||
|
|
||||||
PODFILE CHECKSUM: 568d83cfac207bd024fffa34866403436cf8f991
|
PODFILE CHECKSUM: 568d83cfac207bd024fffa34866403436cf8f991
|
||||||
|
|
||||||
COCOAPODS: 1.11.3
|
COCOAPODS: 1.15.2
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
archiveVersion = 1;
|
archiveVersion = 1;
|
||||||
classes = {
|
classes = {
|
||||||
};
|
};
|
||||||
objectVersion = 51;
|
objectVersion = 54;
|
||||||
objects = {
|
objects = {
|
||||||
|
|
||||||
/* Begin PBXBuildFile section */
|
/* Begin PBXBuildFile section */
|
||||||
@@ -387,7 +387,7 @@
|
|||||||
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
||||||
CODE_SIGN_IDENTITY = "Apple Development";
|
CODE_SIGN_IDENTITY = "Apple Development";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = 20220416;
|
CURRENT_PROJECT_VERSION = 20250527;
|
||||||
DEVELOPMENT_TEAM = 64SK828CZ2;
|
DEVELOPMENT_TEAM = 64SK828CZ2;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "i386 arm64";
|
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "i386 arm64";
|
||||||
@@ -396,6 +396,7 @@
|
|||||||
"$(PROJECT_DIR)/Flutter",
|
"$(PROJECT_DIR)/Flutter",
|
||||||
);
|
);
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
|
INFOPLIST_KEY_CFBundleDisplayName = "黑烟车抓拍系统";
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
|
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
|
||||||
LD_RUNPATH_SEARCH_PATHS = (
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
@@ -405,7 +406,7 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"$(PROJECT_DIR)/Flutter",
|
"$(PROJECT_DIR)/Flutter",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.4.25;
|
MARKETING_VERSION = 1.6.5;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = tech.mluoc.hyzpYbqx;
|
PRODUCT_BUNDLE_IDENTIFIER = tech.mluoc.hyzpYbqx;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||||
@@ -533,7 +534,7 @@
|
|||||||
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
||||||
CODE_SIGN_IDENTITY = "Apple Development";
|
CODE_SIGN_IDENTITY = "Apple Development";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = 20220416;
|
CURRENT_PROJECT_VERSION = 20250527;
|
||||||
DEVELOPMENT_TEAM = 64SK828CZ2;
|
DEVELOPMENT_TEAM = 64SK828CZ2;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "i386 arm64";
|
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "i386 arm64";
|
||||||
@@ -542,6 +543,7 @@
|
|||||||
"$(PROJECT_DIR)/Flutter",
|
"$(PROJECT_DIR)/Flutter",
|
||||||
);
|
);
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
|
INFOPLIST_KEY_CFBundleDisplayName = "黑烟车-测试版";
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
|
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
|
||||||
LD_RUNPATH_SEARCH_PATHS = (
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
@@ -551,8 +553,8 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"$(PROJECT_DIR)/Flutter",
|
"$(PROJECT_DIR)/Flutter",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.4.25;
|
MARKETING_VERSION = 1.6.5;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = tech.mluoc.hyzpYbqx;
|
PRODUCT_BUNDLE_IDENTIFIER = tech.mluoc.hyzpYbqx.debug;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||||
@@ -572,7 +574,7 @@
|
|||||||
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
||||||
CODE_SIGN_IDENTITY = "Apple Development";
|
CODE_SIGN_IDENTITY = "Apple Development";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = 20220416;
|
CURRENT_PROJECT_VERSION = 20250527;
|
||||||
DEVELOPMENT_TEAM = 64SK828CZ2;
|
DEVELOPMENT_TEAM = 64SK828CZ2;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "i386 arm64";
|
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "i386 arm64";
|
||||||
@@ -581,6 +583,7 @@
|
|||||||
"$(PROJECT_DIR)/Flutter",
|
"$(PROJECT_DIR)/Flutter",
|
||||||
);
|
);
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
|
INFOPLIST_KEY_CFBundleDisplayName = "黑烟车抓拍系统";
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
|
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
|
||||||
LD_RUNPATH_SEARCH_PATHS = (
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
@@ -590,7 +593,7 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"$(PROJECT_DIR)/Flutter",
|
"$(PROJECT_DIR)/Flutter",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.4.25;
|
MARKETING_VERSION = 1.6.5;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = tech.mluoc.hyzpYbqx;
|
PRODUCT_BUNDLE_IDENTIFIER = tech.mluoc.hyzpYbqx;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<key>CFBundleDevelopmentRegion</key>
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
<string>zh-Hans</string>
|
<string>zh-Hans</string>
|
||||||
<key>CFBundleDisplayName</key>
|
<key>CFBundleDisplayName</key>
|
||||||
<string>黑烟车抓拍系统</string>
|
<string>$(INFOPLIST_KEY_CFBundleDisplayName)</string>
|
||||||
<key>CFBundleExecutable</key>
|
<key>CFBundleExecutable</key>
|
||||||
<string>$(EXECUTABLE_NAME)</string>
|
<string>$(EXECUTABLE_NAME)</string>
|
||||||
<key>CFBundleIdentifier</key>
|
<key>CFBundleIdentifier</key>
|
||||||
@@ -17,11 +17,34 @@
|
|||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>APPL</string>
|
<string>APPL</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>1.4.31</string>
|
<string>1.6.5</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>16</string>
|
<string>22</string>
|
||||||
<key>ITSAppUsesNonExemptEncryption</key>
|
<key>ITSAppUsesNonExemptEncryption</key>
|
||||||
<false/>
|
<false/>
|
||||||
|
<key>LSApplicationQueriesSchemes</key>
|
||||||
|
<array>
|
||||||
|
<string>comgooglemaps</string>
|
||||||
|
<string>baidumap</string>
|
||||||
|
<string>iosamap</string>
|
||||||
|
<string>waze</string>
|
||||||
|
<string>yandexmaps</string>
|
||||||
|
<string>yandexnavi</string>
|
||||||
|
<string>citymapper</string>
|
||||||
|
<string>mapswithme</string>
|
||||||
|
<string>osmandmaps</string>
|
||||||
|
<string>dgis</string>
|
||||||
|
<string>qqmap</string>
|
||||||
|
<string>here-location</string>
|
||||||
|
<string>tomtomgo</string>
|
||||||
|
<string>copilot</string>
|
||||||
|
<string>com.sygic.aura</string>
|
||||||
|
<string>nmap</string>
|
||||||
|
<string>kakaomap</string>
|
||||||
|
<string>tmap</string>
|
||||||
|
<string>szn-mapy</string>
|
||||||
|
<string>mappls</string>
|
||||||
|
</array>
|
||||||
<key>LSRequiresIPhoneOS</key>
|
<key>LSRequiresIPhoneOS</key>
|
||||||
<true/>
|
<true/>
|
||||||
<key>NSCameraUsageDescription</key>
|
<key>NSCameraUsageDescription</key>
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ before_each do |_lane, _options|
|
|||||||
ENV['USER_NAME'] = 'mlch911@icloud.com'
|
ENV['USER_NAME'] = 'mlch911@icloud.com'
|
||||||
ENV['BUNDLE_ID'] = 'tech.mluoc.hyzpYbqx'
|
ENV['BUNDLE_ID'] = 'tech.mluoc.hyzpYbqx'
|
||||||
ENV['TEAM_ID'] = '64SK828CZ2'
|
ENV['TEAM_ID'] = '64SK828CZ2'
|
||||||
|
ENV['TESM_ID_2'] = '125259471'
|
||||||
ENV['WORKSPACE'] = 'Runner.xcworkspace'
|
ENV['WORKSPACE'] = 'Runner.xcworkspace'
|
||||||
ENV['SCHEME'] = 'Runner'
|
ENV['SCHEME'] = 'Runner'
|
||||||
end
|
end
|
||||||
@@ -77,7 +78,8 @@ platform :ios do
|
|||||||
)
|
)
|
||||||
upload_to_testflight(
|
upload_to_testflight(
|
||||||
ipa: lane_context[:IPA_OUTPUT_PATH],
|
ipa: lane_context[:IPA_OUTPUT_PATH],
|
||||||
team_id: ENV['TEAM_ID'],
|
username: ENV['USER_NAME'],
|
||||||
|
team_id: ENV['TESM_ID_2'],
|
||||||
app_identifier: ENV['BUNDLE_ID'],
|
app_identifier: ENV['BUNDLE_ID'],
|
||||||
distribute_external: true,
|
distribute_external: true,
|
||||||
changelog: '【优化】修复bug,优化体验',
|
changelog: '【优化】修复bug,优化体验',
|
||||||
|
|||||||
@@ -66,6 +66,7 @@ class UserInfo {
|
|||||||
qx_name_long = '宜宾市' + trim_county(qx_name);
|
qx_name_long = '宜宾市' + trim_county(qx_name);
|
||||||
service_tel = '\n服务热线:187-8467-8300';
|
service_tel = '\n服务热线:187-8467-8300';
|
||||||
copyright_info = '© ' + qx_name_long + '生态环境局 四川省踏石科技 版权所有' + service_tel;
|
copyright_info = '© ' + qx_name_long + '生态环境局 四川省踏石科技 版权所有' + service_tel;
|
||||||
|
official_seal = qx_name_long + '生态环境局' + '.png'; // 区县单位公章
|
||||||
// 中心地址:宜宾市白塔山
|
// 中心地址:宜宾市白塔山
|
||||||
center_latitude = 28.77914; // 区县中心纬度
|
center_latitude = 28.77914; // 区县中心纬度
|
||||||
center_longitude = 104.644079; // 区县中心经度
|
center_longitude = 104.644079; // 区县中心经度
|
||||||
@@ -109,6 +110,11 @@ class UserInfo {
|
|||||||
qx_name_long = '宜宾' + qx_name;
|
qx_name_long = '宜宾' + qx_name;
|
||||||
copyright_info = '© ' + qx_name_long + '城乡融合发展局 四川省踏石科技\n版权所有,' + service_tel.substring(1);
|
copyright_info = '© ' + qx_name_long + '城乡融合发展局 四川省踏石科技\n版权所有,' + service_tel.substring(1);
|
||||||
copyright_info_PinYin = 'YIBIN SANJIANG NEW AREA BLACK SMOKE CAR CAPTURE SYSTEM';
|
copyright_info_PinYin = 'YIBIN SANJIANG NEW AREA BLACK SMOKE CAR CAPTURE SYSTEM';
|
||||||
|
|
||||||
|
// 经测试发现,当images目录下面的图片文件名长度达到14个汉字便会报错,将该文件名称改为“宜宾三江新区城乡融合发展局.png”,编译通过
|
||||||
|
// “r:\FlutterProject\FlutterProject61-hyzp_ybqx_with_ios\hyzp_ybqx\assets\images\宜宾三江新区城乡融合发展局.png”
|
||||||
|
official_seal = qx_name_long + '城乡融合发展局' + '.png'; // 区县单位公章
|
||||||
|
|
||||||
// 中心地址:
|
// 中心地址:
|
||||||
// 点击底图空白处响应:coordinate = {latitude: 28.822633806922394, longitude: 104.75964294854222}
|
// 点击底图空白处响应:coordinate = {latitude: 28.822633806922394, longitude: 104.75964294854222}
|
||||||
center_latitude = 28.822633806922394; // 区县中心纬度
|
center_latitude = 28.822633806922394; // 区县中心纬度
|
||||||
@@ -161,6 +167,7 @@ class UserInfo {
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
print('official_seal = $official_seal'); // official_seal = 宜宾市长宁生态环境局.png
|
||||||
}
|
}
|
||||||
|
|
||||||
// 去除末尾的区县
|
// 去除末尾的区县
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import 'dart:math';
|
|||||||
import 'package:ai_save_account/ai_save_account.dart';
|
import 'package:ai_save_account/ai_save_account.dart';
|
||||||
import 'package:audioplayers/audio_cache.dart';
|
import 'package:audioplayers/audio_cache.dart';
|
||||||
import 'package:audioplayers/audioplayers.dart';
|
import 'package:audioplayers/audioplayers.dart';
|
||||||
|
|
||||||
import 'package:camera/camera.dart';
|
import 'package:camera/camera.dart';
|
||||||
import 'package:convert/convert.dart';
|
import 'package:convert/convert.dart';
|
||||||
import 'package:crypto/crypto.dart' as crypto;
|
import 'package:crypto/crypto.dart' as crypto;
|
||||||
@@ -15,17 +14,13 @@ import 'package:device_info/device_info.dart';
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
|
|
||||||
import 'package:fluttertoast/fluttertoast.dart';
|
import 'package:fluttertoast/fluttertoast.dart';
|
||||||
import 'package:hyzp_ybqx/provider/player_region.dart';
|
import 'package:hyzp_ybqx/provider/player_region.dart';
|
||||||
|
|
||||||
import 'UserInfo.dart';
|
import 'UserInfo.dart';
|
||||||
import 'dioFun.dart';
|
|
||||||
|
|
||||||
////////////////////////////////////////////
|
////////////////////////////////////////////
|
||||||
double g_radioImage = 10 / 16; // 违章图片默认宽高比率
|
double g_radioImage = 10 / 16; // 违章图片默认宽高比率
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
AudioPlayer playerClick;
|
AudioPlayer playerClick;
|
||||||
AudioPlayer playerClacks;
|
AudioPlayer playerClacks;
|
||||||
@@ -124,6 +119,52 @@ List listReviewed = [];
|
|||||||
bool g_bVoiceRemind = false; // 用户设置是否开启语音提醒
|
bool g_bVoiceRemind = false; // 用户设置是否开启语音提醒
|
||||||
int g_remindGap = 60; // 提醒间隔默认为60S,0表示取消定时提醒
|
int g_remindGap = 60; // 提醒间隔默认为60S,0表示取消定时提醒
|
||||||
|
|
||||||
|
bool g_bSaveDefaultMap = false; // 是否保存默认地图
|
||||||
|
String g_defaultMapName = ''; // 用户选择的默认地图名称
|
||||||
|
// 获取地图的中文名称
|
||||||
|
String getMapChsName(String mapName) {
|
||||||
|
if (mapName.length == 0) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
mapName = mapName.toLowerCase();
|
||||||
|
String mapKey = '';
|
||||||
|
String _mapChsName = '';
|
||||||
|
|
||||||
|
// 查找包含 mapName 的最短 key
|
||||||
|
for (var key in mapChsName.keys) {
|
||||||
|
// print('$key ${mapChsName[key]}');
|
||||||
|
if (mapName.indexOf(key) > -1) {
|
||||||
|
if (mapKey.length == 0 || key.length < mapKey.length) {
|
||||||
|
mapKey = key;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
_mapChsName = mapChsName[mapKey];
|
||||||
|
|
||||||
|
if (_mapChsName == null) {
|
||||||
|
_mapChsName = mapName + (mapName.length > 0 ? '地图' : '');
|
||||||
|
}
|
||||||
|
return _mapChsName;
|
||||||
|
}
|
||||||
|
|
||||||
|
// key 全部小写
|
||||||
|
Map<String, String> mapChsName = {
|
||||||
|
'apple': '苹果地图',
|
||||||
|
'google': '谷歌地图',
|
||||||
|
'googlego': '谷歌地图轻量版',
|
||||||
|
'amap': '高德地图',
|
||||||
|
'baidu': '百度地图',
|
||||||
|
'waze': '位智地图',
|
||||||
|
'yandexmaps': 'Yandex地图',
|
||||||
|
'yandexnavi': 'Yandex导航地图',
|
||||||
|
'citymapper': '城市地图',
|
||||||
|
'mapswithme': '离线地图',
|
||||||
|
'osmand': 'OsmAnd地图',
|
||||||
|
'doubleGis': 'doubleGis地图',
|
||||||
|
'tencent': '腾讯地图',
|
||||||
|
};
|
||||||
|
|
||||||
// Timer g_remindTimer; //定时提醒变量
|
// Timer g_remindTimer; //定时提醒变量
|
||||||
//
|
//
|
||||||
// // 设置定时提醒
|
// // 设置定时提醒
|
||||||
@@ -187,6 +228,7 @@ String copyright_info_PinYin = '';
|
|||||||
// 区县中心地址
|
// 区县中心地址
|
||||||
double center_latitude = -1; // 区县中心纬度
|
double center_latitude = -1; // 区县中心纬度
|
||||||
double center_longitude = -1; // 区县中心经度
|
double center_longitude = -1; // 区县中心经度
|
||||||
|
String official_seal = ''; // 区县单位公章
|
||||||
|
|
||||||
clear_user_info() {
|
clear_user_info() {
|
||||||
qx_code = -1;
|
qx_code = -1;
|
||||||
@@ -887,7 +929,7 @@ Widget getImageWidget() {
|
|||||||
color: Color.fromRGBO(49, 216, 123, 1),
|
color: Color.fromRGBO(49, 216, 123, 1),
|
||||||
fontWeight: FontWeight.bold)),
|
fontWeight: FontWeight.bold)),
|
||||||
),
|
),
|
||||||
SizedBox(height: ScreenUtil().setHeight(copyright_info.contains('\n') ? 25 : 90)),
|
SizedBox(height: ScreenUtil().setHeight(copyright_info.contains('\n') ? 25 : 70)),
|
||||||
Container(
|
Container(
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
child: Text(copyright_info,
|
child: Text(copyright_info,
|
||||||
|
|||||||
@@ -2078,6 +2078,7 @@ Future playUrl({@required int index, String url, BuildContext context}) {
|
|||||||
id: index + 1,
|
id: index + 1,
|
||||||
dwip: listDwinfoGetList2[index]['dwip'],
|
dwip: listDwinfoGetList2[index]['dwip'],
|
||||||
url: urlnew,
|
url: urlnew,
|
||||||
|
urlType: 'rtmp',
|
||||||
title: '点位视频\n${(index + 1)}、${listDwinfoGetList2[index]['dwmc']}',
|
title: '点位视频\n${(index + 1)}、${listDwinfoGetList2[index]['dwmc']}',
|
||||||
)));
|
)));
|
||||||
|
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ class _MyAppState extends State<MyApp> {
|
|||||||
// g_bVoiceRemind = (null == g_bVoiceRemind) ? false : g_bVoiceRemind; // 默认关闭
|
// g_bVoiceRemind = (null == g_bVoiceRemind) ? false : g_bVoiceRemind; // 默认关闭
|
||||||
g_bVoiceRemind = (null == g_bVoiceRemind) ? true : g_bVoiceRemind; // 默认开启
|
g_bVoiceRemind = (null == g_bVoiceRemind) ? true : g_bVoiceRemind; // 默认开启
|
||||||
// print('g_bVoiceRemind = $g_bVoiceRemind');
|
// print('g_bVoiceRemind = $g_bVoiceRemind');
|
||||||
g_remindGap = await Storage.getInt('nRemindGap');
|
g_remindGap = await Storage.getInt('nRemindGap');
|
||||||
g_remindGap = (null == g_remindGap) ? 60 : g_remindGap; // 提醒间隔默认为60S
|
g_remindGap = (null == g_remindGap) ? 60 : g_remindGap; // 提醒间隔默认为60S
|
||||||
|
|
||||||
eventBus.fire(VoiceRemindUpdate('g_bVoiceRemind 数据已更新'));
|
eventBus.fire(VoiceRemindUpdate('g_bVoiceRemind 数据已更新'));
|
||||||
|
|||||||
@@ -0,0 +1,50 @@
|
|||||||
|
//MIT License
|
||||||
|
//
|
||||||
|
//Copyright (c) [2019] [Befovy]
|
||||||
|
//
|
||||||
|
//Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
//of this software and associated documentation files (the "Software"), to deal
|
||||||
|
//in the Software without restriction, including without limitation the rights
|
||||||
|
//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
//copies of the Software, and to permit persons to whom the Software is
|
||||||
|
//furnished to do so, subject to the following conditions:
|
||||||
|
//
|
||||||
|
//The above copyright notice and this permission notice shall be included in all
|
||||||
|
//copies or substantial portions of the Software.
|
||||||
|
//
|
||||||
|
//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
//SOFTWARE.
|
||||||
|
|
||||||
|
//r:\Flutter\FlutterSDK\flutter\.pub-cache\hosted\pub.flutter-io.cn\fijkplayer-0.8.4\lib\core\MyFijkValue.dart
|
||||||
|
//part of fijkplayer;
|
||||||
|
|
||||||
|
import 'dart:core';
|
||||||
|
|
||||||
|
//新增的,为变私有成员为公有成员
|
||||||
|
class MyFijkData {
|
||||||
|
static String fijkViewPanelVolume = "__fijkview_panel_init_volume";
|
||||||
|
static String fijkViewPanelBrightness = "__fijkview_panel_init_brightness";
|
||||||
|
static String fijkViewPanelSeekto = "__fijkview_panel_sekto_position";
|
||||||
|
}
|
||||||
|
|
||||||
|
//新增的,为变私有成员为公有成员
|
||||||
|
String mYduration2String(Duration duration) {
|
||||||
|
if (duration.inMilliseconds < 0) return "-: negtive";
|
||||||
|
|
||||||
|
String twoDigits(int n) {
|
||||||
|
if (n >= 10) return "$n";
|
||||||
|
return "0$n";
|
||||||
|
}
|
||||||
|
|
||||||
|
String twoDigitMinutes = twoDigits(duration.inMinutes.remainder(60));
|
||||||
|
String twoDigitSeconds = twoDigits(duration.inSeconds.remainder(60));
|
||||||
|
int inHours = duration.inHours;
|
||||||
|
return inHours > 0
|
||||||
|
? "$inHours:$twoDigitMinutes:$twoDigitSeconds"
|
||||||
|
: "$twoDigitMinutes:$twoDigitSeconds";
|
||||||
|
}
|
||||||
@@ -0,0 +1,829 @@
|
|||||||
|
import 'dart:async';
|
||||||
|
import 'dart:core';
|
||||||
|
import 'dart:math';
|
||||||
|
import 'dart:ui';
|
||||||
|
import 'dart:typed_data';
|
||||||
|
import 'dart:io' show Platform;
|
||||||
|
|
||||||
|
import 'package:fijkplayer/fijkplayer.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:flutter/foundation.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter/rendering.dart';
|
||||||
|
import 'package:flutter/widgets.dart';
|
||||||
|
import 'my_fijkvalue.dart';
|
||||||
|
import '../components/commonFun.dart';
|
||||||
|
import 'package:provider/provider.dart';
|
||||||
|
import '../provider/player_ratio.dart';
|
||||||
|
import 'my_slider.dart';
|
||||||
|
// import '../my_extended_image/common/image_picker/_image_picker_io.dart';
|
||||||
|
import '../services/Storage.dart';
|
||||||
|
|
||||||
|
// class MyFijkPanelWidgetBuilder extends StatefulWidget {
|
||||||
|
// const MyFijkPanelWidgetBuilder({Key key, this.path}) : super(key: key);
|
||||||
|
// final path;
|
||||||
|
// @override
|
||||||
|
// State<StatefulWidget> createState() {
|
||||||
|
// return MyFijkPanelWidgetBuilderState();
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// snapshot
|
||||||
|
ImageProvider myImageProvider;
|
||||||
|
//ImageProvider _imageProvider;
|
||||||
|
//Timer _snapshotTimer;
|
||||||
|
|
||||||
|
FijkPanelWidgetBuilder fijkPanel2Builder3(
|
||||||
|
{Key key,
|
||||||
|
final FijkPlayer player,
|
||||||
|
final bool fill = false,
|
||||||
|
final int duration = 4000,
|
||||||
|
final bool doubleTap = true,
|
||||||
|
final bool snapShot = false,
|
||||||
|
final VoidCallback onBack}) {
|
||||||
|
return (FijkPlayer player, FijkData data, BuildContext context, Size viewSize,
|
||||||
|
Rect texturePos) {
|
||||||
|
return MyFijkPanelWidgetBuilder(
|
||||||
|
key: key,
|
||||||
|
player: player,
|
||||||
|
data: data,
|
||||||
|
onBack: onBack,
|
||||||
|
viewSize: viewSize,
|
||||||
|
texPos: texturePos,
|
||||||
|
fill: fill,
|
||||||
|
doubleTap: doubleTap,
|
||||||
|
snapShot: Platform.isIOS ? false : snapShot,
|
||||||
|
hideDuration: duration,
|
||||||
|
);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
class MyFijkPanelWidgetBuilder extends StatefulWidget {
|
||||||
|
final FijkPlayer player;
|
||||||
|
final FijkData data;
|
||||||
|
final VoidCallback onBack;
|
||||||
|
final Size viewSize;
|
||||||
|
final Rect texPos;
|
||||||
|
final bool fill;
|
||||||
|
final bool doubleTap;
|
||||||
|
final bool snapShot;
|
||||||
|
final int hideDuration;
|
||||||
|
|
||||||
|
const MyFijkPanelWidgetBuilder(
|
||||||
|
{Key key,
|
||||||
|
@required this.player,
|
||||||
|
this.data,
|
||||||
|
this.fill,
|
||||||
|
this.onBack,
|
||||||
|
this.viewSize,
|
||||||
|
this.hideDuration,
|
||||||
|
this.doubleTap,
|
||||||
|
this.snapShot,
|
||||||
|
this.texPos})
|
||||||
|
: assert(player != null),
|
||||||
|
assert(
|
||||||
|
hideDuration != null && hideDuration > 0 && hideDuration < 10000),
|
||||||
|
super(key: key);
|
||||||
|
|
||||||
|
// @override
|
||||||
|
// FijkPanel2State createState() => FijkPanel2State();
|
||||||
|
// @override
|
||||||
|
//State<StatefulWidget> createState() {
|
||||||
|
MyFijkPanelWidgetBuilderState createState() {
|
||||||
|
return MyFijkPanelWidgetBuilderState(player);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class MyFijkPanelWidgetBuilderState extends State<MyFijkPanelWidgetBuilder>
|
||||||
|
with SingleTickerProviderStateMixin {
|
||||||
|
FijkPlayer player;
|
||||||
|
|
||||||
|
MyFijkPanelWidgetBuilderState(@required this.player) {
|
||||||
|
_oldFullScreen = player.value.fullScreen;
|
||||||
|
}
|
||||||
|
|
||||||
|
PlayerRatioProvide playerRatioProvide;
|
||||||
|
AnimationController _controller;
|
||||||
|
Animation<Offset> _animation;
|
||||||
|
Offset _normalizedOffset;
|
||||||
|
double _previousScale;
|
||||||
|
double _kMinFlingVelocity = 600.0;
|
||||||
|
|
||||||
|
Offset _offset = Offset.zero;
|
||||||
|
double _scale = 1.0;
|
||||||
|
Offset _focalPoint = Offset.zero;
|
||||||
|
Offset _deltaPoint = Offset.zero;
|
||||||
|
|
||||||
|
bool _oldFullScreen;
|
||||||
|
bool _bScaleing = false;
|
||||||
|
|
||||||
|
//FijkPlayer get player => widget.player;
|
||||||
|
|
||||||
|
Timer _hideTimer;
|
||||||
|
bool _hideStuff = true;
|
||||||
|
|
||||||
|
Timer _statelessTimer;
|
||||||
|
bool _prepared = false;
|
||||||
|
bool _playing = false;
|
||||||
|
|
||||||
|
//bool _dragLeft;
|
||||||
|
int _nDrag; //0 Left, 1 Center, 2 Right
|
||||||
|
double _volume;
|
||||||
|
double _brightness;
|
||||||
|
double _deltaX = 0;
|
||||||
|
double _deltaY = 0;
|
||||||
|
|
||||||
|
double _seekPos = -1.0;
|
||||||
|
Duration _duration = Duration();
|
||||||
|
Duration _currentPos = Duration();
|
||||||
|
Duration _bufferPos = Duration();
|
||||||
|
|
||||||
|
StreamSubscription _currentPosSubs;
|
||||||
|
StreamSubscription _bufferPosSubs;
|
||||||
|
|
||||||
|
StreamController<double> _valController;
|
||||||
|
|
||||||
|
// snapshot
|
||||||
|
//ImageProvider _imageProvider;
|
||||||
|
Timer _snapshotTimer;
|
||||||
|
|
||||||
|
// Is it needed to clear seek data in FijkData (widget.data)
|
||||||
|
bool _needClearSeekData = true;
|
||||||
|
|
||||||
|
static const MyFijkSliderColors sliderColors = MyFijkSliderColors();
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
super.initState();
|
||||||
|
|
||||||
|
_controller = AnimationController(vsync: this);
|
||||||
|
_controller.addListener(() {
|
||||||
|
setState(() {
|
||||||
|
_offset = _animation.value;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
_valController = StreamController.broadcast();
|
||||||
|
_prepared = player.state.index >= FijkState.prepared.index;
|
||||||
|
_playing = player.state == FijkState.started;
|
||||||
|
_duration = player.value.duration;
|
||||||
|
_currentPos = player.currentPos;
|
||||||
|
_bufferPos = player.bufferPos;
|
||||||
|
|
||||||
|
_currentPosSubs = player.onCurrentPosUpdate.listen((v) {
|
||||||
|
if (_hideStuff == false) {
|
||||||
|
setState(() {
|
||||||
|
_currentPos = v;
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
_currentPos = v;
|
||||||
|
}
|
||||||
|
if (_needClearSeekData) {
|
||||||
|
widget.data.clearValue(MyFijkData.fijkViewPanelSeekto);
|
||||||
|
}
|
||||||
|
_needClearSeekData = false;
|
||||||
|
});
|
||||||
|
|
||||||
|
if (widget.data.contains(MyFijkData.fijkViewPanelSeekto)) {
|
||||||
|
var pos = widget.data.getValue(MyFijkData.fijkViewPanelSeekto) as double;
|
||||||
|
_currentPos = Duration(milliseconds: pos.toInt());
|
||||||
|
}
|
||||||
|
|
||||||
|
_bufferPosSubs = player.onBufferPosUpdate.listen((v) {
|
||||||
|
if (_hideStuff == false) {
|
||||||
|
setState(() {
|
||||||
|
_bufferPos = v;
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
_bufferPos = v;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
player.addListener(_playerValueChanged);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void dispose() {
|
||||||
|
super.dispose();
|
||||||
|
_controller.dispose();
|
||||||
|
_valController?.close();
|
||||||
|
_hideTimer?.cancel();
|
||||||
|
_statelessTimer?.cancel();
|
||||||
|
_snapshotTimer?.cancel();
|
||||||
|
_currentPosSubs?.cancel();
|
||||||
|
_bufferPosSubs?.cancel();
|
||||||
|
player.removeListener(_playerValueChanged);
|
||||||
|
}
|
||||||
|
|
||||||
|
double dura2double(Duration d) {
|
||||||
|
return d != null ? d.inMilliseconds.toDouble() : 0.0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void _playerValueChanged() {
|
||||||
|
FijkValue value = player.value;
|
||||||
|
|
||||||
|
if (value.duration != _duration) {
|
||||||
|
if (_hideStuff == false) {
|
||||||
|
setState(() {
|
||||||
|
_duration = value.duration;
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
_duration = value.duration;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
bool playing = (value.state == FijkState.started);
|
||||||
|
bool prepared = value.prepared;
|
||||||
|
if (playing != _playing ||
|
||||||
|
prepared != _prepared ||
|
||||||
|
value.state == FijkState.asyncPreparing) {
|
||||||
|
setState(() {
|
||||||
|
_playing = playing;
|
||||||
|
_prepared = prepared;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void _restartHideTimer() {
|
||||||
|
_hideTimer?.cancel();
|
||||||
|
_hideTimer = Timer(Duration(milliseconds: widget.hideDuration), () {
|
||||||
|
setState(() {
|
||||||
|
_hideStuff = true;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void onTapFun() {
|
||||||
|
if (_hideStuff == true) {
|
||||||
|
_restartHideTimer();
|
||||||
|
}
|
||||||
|
setState(() {
|
||||||
|
_hideStuff = !_hideStuff;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void playOrPause() {
|
||||||
|
if (player.isPlayable() || player.state == FijkState.asyncPreparing) {
|
||||||
|
if (player.state == FijkState.started) {
|
||||||
|
//bPlaying = false;
|
||||||
|
playerRegionProvide.changePlayerState(false);
|
||||||
|
Storage.setString('bPlaying', 'false');
|
||||||
|
player.pause();
|
||||||
|
} else {
|
||||||
|
//bPlaying = true;
|
||||||
|
playerRegionProvide.changePlayerState(true);
|
||||||
|
Storage.setString('bPlaying', 'true');
|
||||||
|
player.start();
|
||||||
|
}
|
||||||
|
//setState(() {});
|
||||||
|
} else {
|
||||||
|
FijkLog.w("Invalid state ${player.state} ,can't perform play or pause");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void onVerticalDragStartFun(DragStartDetails d) {
|
||||||
|
// if (_bScaleing) {
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
if (d.localPosition.dx > panelWidth() * 3 / 4) {
|
||||||
|
// right, volume
|
||||||
|
//_dragLeft = false;
|
||||||
|
_nDrag = 2; //0 Left, 1 Center, 2 Right
|
||||||
|
|
||||||
|
//https://fijkplayer.befovy.com/docs/zh/system-volume.html#gsc.tab=0
|
||||||
|
/// never show system volume changed UI.
|
||||||
|
int neverShowUI = 2;
|
||||||
|
FijkVolume.setUIMode(neverShowUI);
|
||||||
|
|
||||||
|
FijkVolume.getVol().then((v) {
|
||||||
|
if (widget.data != null &&
|
||||||
|
!widget.data.contains(MyFijkData.fijkViewPanelVolume)) {
|
||||||
|
widget.data.setValue(MyFijkData.fijkViewPanelVolume, v);
|
||||||
|
}
|
||||||
|
setState(() {
|
||||||
|
_volume = v;
|
||||||
|
_valController.add(v);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
} else if (d.localPosition.dx < panelWidth() / 4) {
|
||||||
|
// left, brightness
|
||||||
|
//_dragLeft = true;
|
||||||
|
_nDrag = 0; //0 Left, 1 Center, 2 Right
|
||||||
|
FijkPlugin.screenBrightness().then((v) {
|
||||||
|
if (widget.data != null &&
|
||||||
|
!widget.data.contains(MyFijkData.fijkViewPanelBrightness)) {
|
||||||
|
widget.data.setValue(MyFijkData.fijkViewPanelBrightness, v);
|
||||||
|
}
|
||||||
|
setState(() {
|
||||||
|
_brightness = v;
|
||||||
|
_valController.add(v);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
_nDrag = 1; //0 Left, 1 Center, 2 Right
|
||||||
|
// setState(() {
|
||||||
|
// if (_oldFullScreen != player.value.fullScreen) {
|
||||||
|
// //全屏和窗口之间切换,便初始化相关变量
|
||||||
|
// _oldFullScreen = player.value.fullScreen;
|
||||||
|
// // _offset = Offset.zero;
|
||||||
|
// // _scale = 1.0;
|
||||||
|
// //_focalPoint = Offset.zero;
|
||||||
|
// //_deltaPoint = Offset.zero;
|
||||||
|
// }
|
||||||
|
// // _bScaleing = true;
|
||||||
|
// // _previousScale = _scale;
|
||||||
|
// // _normalizedOffset = (d.localPosition - _offset) / _scale;
|
||||||
|
// // // 计算图片放大后的位置
|
||||||
|
// // _controller.stop();
|
||||||
|
// });
|
||||||
|
}
|
||||||
|
_statelessTimer?.cancel();
|
||||||
|
_statelessTimer = Timer(const Duration(milliseconds: 2000), () {
|
||||||
|
setState(() {});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void onVerticalDragUpdateFun(DragUpdateDetails d) {
|
||||||
|
// if (_bScaleing) {
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
|
||||||
|
double delta = d.primaryDelta / panelHeight();
|
||||||
|
print("d.primaryDelta = ${d.primaryDelta}, delta = {$delta}");
|
||||||
|
|
||||||
|
delta = -delta.clamp(-1.0, 1.0);
|
||||||
|
//if (_dragLeft != null && _dragLeft == false) {
|
||||||
|
if (_nDrag != null && _nDrag == 2) {
|
||||||
|
if (_volume != null) {
|
||||||
|
_volume += delta;
|
||||||
|
_volume = _volume.clamp(0.0, 1.0);
|
||||||
|
FijkVolume.setVol(_volume);
|
||||||
|
setState(() {
|
||||||
|
_valController.add(_volume);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
//} else if (_dragLeft != null && _dragLeft == true) {
|
||||||
|
} else if (_nDrag != null && _nDrag == 0) {
|
||||||
|
if (_brightness != null) {
|
||||||
|
_brightness += delta;
|
||||||
|
_brightness = _brightness.clamp(0.0, 1.0);
|
||||||
|
FijkPlugin.setScreenBrightness(_brightness);
|
||||||
|
setState(() {
|
||||||
|
_valController.add(_brightness);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
setState(() {
|
||||||
|
//_scale = (_previousScale * details.scale).clamp(1.0, 10.0);
|
||||||
|
// 限制放大倍数 1~10倍
|
||||||
|
// _offset = _clampOffset(d.localPosition - _normalizedOffset * _scale);
|
||||||
|
// playerRatioProvide.changeOffset(_offset);
|
||||||
|
|
||||||
|
_deltaY -= 2 * d.primaryDelta / panelHeight();
|
||||||
|
_deltaY = _deltaY.clamp(-1.0, 1.0);
|
||||||
|
playerRatioProvide.changeDeltaY(_deltaY);
|
||||||
|
// 更新当前位置
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void onVerticalDragEndFun(DragEndDetails e) {
|
||||||
|
_volume = null;
|
||||||
|
_brightness = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget buildPlayButton(BuildContext context, double height) {
|
||||||
|
Icon icon = (player.state == FijkState.started)
|
||||||
|
? Icon(Icons.pause)
|
||||||
|
: Icon(Icons.play_arrow);
|
||||||
|
bool fullScreen = player.value.fullScreen;
|
||||||
|
return IconButton(
|
||||||
|
padding: EdgeInsets.all(0),
|
||||||
|
iconSize: fullScreen ? height : height * 0.8,
|
||||||
|
color: Color(0xFFFFFFFF),
|
||||||
|
icon: icon,
|
||||||
|
onPressed: playOrPause,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget buildFullScreenButton(BuildContext context, double height) {
|
||||||
|
Icon icon = player.value.fullScreen
|
||||||
|
? Icon(Icons.fullscreen_exit)
|
||||||
|
: Icon(Icons.fullscreen);
|
||||||
|
bool fullScreen = player.value.fullScreen;
|
||||||
|
return IconButton(
|
||||||
|
padding: EdgeInsets.all(0),
|
||||||
|
iconSize: fullScreen ? height : height * 0.8,
|
||||||
|
color: Color(0xFFFFFFFF),
|
||||||
|
icon: icon,
|
||||||
|
onPressed: () {
|
||||||
|
player.value.fullScreen
|
||||||
|
? player.exitFullScreen()
|
||||||
|
: player.enterFullScreen();
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget buildTimeText(BuildContext context, double height) {
|
||||||
|
String text = "${mYduration2String(_currentPos)}" +
|
||||||
|
"/${mYduration2String(_duration)}";
|
||||||
|
return Text(text, style: TextStyle(fontSize: 12, color: Color(0xFFFFFFFF)));
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget buildSlider(BuildContext context) {
|
||||||
|
double duration = dura2double(_duration);
|
||||||
|
|
||||||
|
double currentValue = _seekPos > 0 ? _seekPos : dura2double(_currentPos);
|
||||||
|
currentValue = currentValue.clamp(0.0, duration);
|
||||||
|
|
||||||
|
double bufferPos = dura2double(_bufferPos);
|
||||||
|
bufferPos = bufferPos.clamp(0.0, duration);
|
||||||
|
|
||||||
|
return Padding(
|
||||||
|
padding: EdgeInsets.only(left: 0),
|
||||||
|
child: MyFijkSlider(
|
||||||
|
colors: sliderColors,
|
||||||
|
value: currentValue,
|
||||||
|
cacheValue: bufferPos,
|
||||||
|
min: 0.0,
|
||||||
|
max: duration,
|
||||||
|
onChanged: (v) {
|
||||||
|
_restartHideTimer();
|
||||||
|
setState(() {
|
||||||
|
_seekPos = v;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
onChangeEnd: (v) {
|
||||||
|
setState(() {
|
||||||
|
player.seekTo(v.toInt());
|
||||||
|
_currentPos = Duration(milliseconds: _seekPos.toInt());
|
||||||
|
widget.data.setValue(MyFijkData.fijkViewPanelSeekto, _seekPos);
|
||||||
|
_needClearSeekData = true;
|
||||||
|
_seekPos = -1.0;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget buildBottom(BuildContext context, double height) {
|
||||||
|
if (_duration != null && _duration.inMilliseconds > 0) {
|
||||||
|
return Row(
|
||||||
|
children: <Widget>[
|
||||||
|
buildPlayButton(context, height),
|
||||||
|
buildTimeText(context, height),
|
||||||
|
Expanded(child: buildSlider(context)),
|
||||||
|
buildFullScreenButton(context, height),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
return Row(
|
||||||
|
children: <Widget>[
|
||||||
|
buildPlayButton(context, height),
|
||||||
|
Expanded(child: Container()),
|
||||||
|
buildFullScreenButton(context, height),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void takeSnapshot() {
|
||||||
|
player.takeSnapShot().then((v) {
|
||||||
|
var provider = MemoryImage(v);
|
||||||
|
precacheImage(provider, context).then((_) {
|
||||||
|
setState(() {
|
||||||
|
myImageProvider = provider;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
FijkLog.d("get snapshot succeed");
|
||||||
|
|
||||||
|
// //Uint8List fileData;
|
||||||
|
// String fileFath;
|
||||||
|
// ImageSaver.save('extended_image_cropped_image.jpg', v).then((value) {
|
||||||
|
// fileFath = value;
|
||||||
|
// // var fileFath = await ImagePickerSaver.saveFile(fileData: fileData);
|
||||||
|
// print('my save fileFath : $fileFath');
|
||||||
|
// });
|
||||||
|
}).catchError((e) {
|
||||||
|
FijkLog.d("get snapshot failed");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget buildPanel(BuildContext context) {
|
||||||
|
double height = panelHeight();
|
||||||
|
|
||||||
|
bool fullScreen = player.value.fullScreen;
|
||||||
|
Widget centerWidget = Container(
|
||||||
|
color: Color(0x00000000),
|
||||||
|
);
|
||||||
|
|
||||||
|
Widget centerChild = Container(
|
||||||
|
color: Color(0x00000000),
|
||||||
|
);
|
||||||
|
|
||||||
|
if (fullScreen && widget.snapShot) {
|
||||||
|
centerWidget = Row(
|
||||||
|
children: <Widget>[
|
||||||
|
Expanded(child: centerChild),
|
||||||
|
Padding(
|
||||||
|
padding: EdgeInsets.only(left: 10, right: 10, top: 8, bottom: 8),
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||||
|
children: <Widget>[
|
||||||
|
IconButton(
|
||||||
|
padding: EdgeInsets.all(0),
|
||||||
|
color: Color(0xFFFFFFFF),
|
||||||
|
icon: Icon(Icons.camera_alt),
|
||||||
|
onPressed: () {
|
||||||
|
takeSnapshot();
|
||||||
|
},
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||||
|
children: <Widget>[
|
||||||
|
Container(
|
||||||
|
height: height > 200 ? 80 : height / 5,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
gradient: LinearGradient(
|
||||||
|
colors: [Color(0x88000000), Color(0x00000000)],
|
||||||
|
begin: Alignment.topCenter,
|
||||||
|
end: Alignment.bottomCenter,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: centerWidget,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
height: height > 80 ? 80 : height / 2,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
gradient: LinearGradient(
|
||||||
|
colors: [Color(0x88000000), Color(0x00000000)],
|
||||||
|
end: Alignment.topCenter,
|
||||||
|
begin: Alignment.bottomCenter,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
alignment: Alignment.bottomCenter,
|
||||||
|
child: Container(
|
||||||
|
height: height > 80 ? 45 : height / 2,
|
||||||
|
padding: EdgeInsets.only(left: 8, right: 8, bottom: 5),
|
||||||
|
child: buildBottom(context, height > 80 ? 40 : height / 2),
|
||||||
|
// child: CustomFijkWidgetBottom(
|
||||||
|
// player: player,
|
||||||
|
// buildContext: context,
|
||||||
|
// viewSize:
|
||||||
|
// Size(widget.viewSize.width, widget.viewSize.height - 50),
|
||||||
|
// texturePos: Rect.fromLTRB(widget.texPos.left, widget.texPos.top,
|
||||||
|
// widget.texPos.width, widget.texPos.height - 50),
|
||||||
|
//),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Rect panelRect() {
|
||||||
|
Rect rect = player.value.fullScreen || (true == widget.fill)
|
||||||
|
? Rect.fromLTWH(0, 0, widget.viewSize.width, widget.viewSize.height)
|
||||||
|
: Rect.fromLTRB(
|
||||||
|
max(0.0, widget.texPos.left),
|
||||||
|
max(0.0, widget.texPos.top),
|
||||||
|
min(widget.viewSize.width, widget.texPos.right),
|
||||||
|
min(widget.viewSize.height, widget.texPos.bottom));
|
||||||
|
return rect;
|
||||||
|
}
|
||||||
|
|
||||||
|
double panelHeight() {
|
||||||
|
if (player.value.fullScreen || (true == widget.fill)) {
|
||||||
|
return widget.viewSize.height;
|
||||||
|
} else {
|
||||||
|
return min(widget.viewSize.height, widget.texPos.bottom) -
|
||||||
|
max(0.0, widget.texPos.top);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
double panelWidth() {
|
||||||
|
if (player.value.fullScreen || (true == widget.fill)) {
|
||||||
|
return widget.viewSize.width;
|
||||||
|
} else {
|
||||||
|
return min(widget.viewSize.width, widget.texPos.right) -
|
||||||
|
max(0.0, widget.texPos.left);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget buildBack(BuildContext context) {
|
||||||
|
return IconButton(
|
||||||
|
padding: EdgeInsets.only(left: 5),
|
||||||
|
icon: Icon(
|
||||||
|
Icons.arrow_back_ios,
|
||||||
|
color: Color(0xDDFFFFFF),
|
||||||
|
),
|
||||||
|
onPressed: widget.onBack,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget buildStateless() {
|
||||||
|
if (_volume != null || _brightness != null) {
|
||||||
|
Widget toast = _volume == null
|
||||||
|
? defaultFijkBrightnessToast(_brightness, _valController.stream)
|
||||||
|
: defaultFijkVolumeToast(_volume, _valController.stream);
|
||||||
|
return IgnorePointer(
|
||||||
|
child: AnimatedOpacity(
|
||||||
|
opacity: 1,
|
||||||
|
duration: Duration(milliseconds: 500),
|
||||||
|
child: toast,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
} else if (player.state == FijkState.asyncPreparing) {
|
||||||
|
return Container(
|
||||||
|
alignment: Alignment.center,
|
||||||
|
child: SizedBox(
|
||||||
|
width: 30,
|
||||||
|
height: 30,
|
||||||
|
child: CircularProgressIndicator(
|
||||||
|
valueColor: AlwaysStoppedAnimation(Colors.white)),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
} else if (player.state == FijkState.error) {
|
||||||
|
return Container(
|
||||||
|
alignment: Alignment.center,
|
||||||
|
child: Icon(
|
||||||
|
Icons.error,
|
||||||
|
size: 30,
|
||||||
|
color: Color(0x99FFFFFF),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
} else if (myImageProvider != null) {
|
||||||
|
_snapshotTimer?.cancel();
|
||||||
|
_snapshotTimer = Timer(Duration(milliseconds: 1500), () {
|
||||||
|
if (mounted) {
|
||||||
|
setState(() {
|
||||||
|
myImageProvider = null;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return Center(
|
||||||
|
child: IgnorePointer(
|
||||||
|
child: Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
border: Border.all(color: Colors.yellowAccent, width: 3)),
|
||||||
|
child:
|
||||||
|
Image(height: 200, fit: BoxFit.contain, image: myImageProvider),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
return Container();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
GestureDetector buildGestureDetector(BuildContext context) {
|
||||||
|
return GestureDetector(
|
||||||
|
onScaleStart: _handleOnScaleStart,
|
||||||
|
onScaleUpdate: _handleOnScaleUpdate,
|
||||||
|
onScaleEnd: _handleOnScaleEnd,
|
||||||
|
onDoubleTap: () {
|
||||||
|
//自定义 FijkView 的双击响应
|
||||||
|
print('My onDoubleTap');
|
||||||
|
if (1.0 == playerRatioProvide.scale) {
|
||||||
|
playOrPause();
|
||||||
|
} else {
|
||||||
|
_handleScaleBack();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
onTap: onTapFun,
|
||||||
|
//onDoubleTap: widget.doubleTap ? onDoubleTapFun : null,
|
||||||
|
onVerticalDragUpdate: onVerticalDragUpdateFun,
|
||||||
|
onVerticalDragStart: onVerticalDragStartFun,
|
||||||
|
onVerticalDragEnd: onVerticalDragEndFun,
|
||||||
|
//onHorizontalDragUpdate: (d) {},
|
||||||
|
child: AbsorbPointer(
|
||||||
|
absorbing: _hideStuff,
|
||||||
|
child: AnimatedOpacity(
|
||||||
|
opacity: _hideStuff ? 0 : 1,
|
||||||
|
duration: Duration(milliseconds: 300),
|
||||||
|
child: buildPanel(context),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
void _handleOnScaleStart(ScaleStartDetails details) {
|
||||||
|
setState(() {
|
||||||
|
// if (_oldFullScreen != player.value.fullScreen) {
|
||||||
|
// //全屏和窗口之间切换,便初始化相关变量
|
||||||
|
// _oldFullScreen = player.value.fullScreen;
|
||||||
|
// // _offset = Offset.zero;
|
||||||
|
// // _scale = 1.0;
|
||||||
|
// //_focalPoint = Offset.zero;
|
||||||
|
// //_deltaPoint = Offset.zero;
|
||||||
|
// }
|
||||||
|
|
||||||
|
_bScaleing = true;
|
||||||
|
_previousScale = _scale;
|
||||||
|
_normalizedOffset = (details.focalPoint - _offset) / _scale;
|
||||||
|
// 计算图片放大后的位置
|
||||||
|
_controller.stop();
|
||||||
|
_focalPoint = details.focalPoint;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void _handleScaleBack() {
|
||||||
|
// 更新当前位置
|
||||||
|
playerRatioProvide.changeScale(1.0);
|
||||||
|
playerRatioProvide.changeOffset(Offset(0, 0));
|
||||||
|
playerRatioProvide.changeDeltaX(0.0);
|
||||||
|
playerRatioProvide.changeDeltaY(0.0);
|
||||||
|
}
|
||||||
|
|
||||||
|
void _handleOnScaleUpdate(ScaleUpdateDetails details) {
|
||||||
|
setState(() {
|
||||||
|
print('details.scale = ${details.scale}');
|
||||||
|
//print('_scale = $_scale, offset.dx = ${_offset.dx}, offset.dy = ${_offset.dy}');
|
||||||
|
//print('details.focalPoint = (${details.focalPoint.dx}, ${details.focalPoint.dy})');
|
||||||
|
//print('details.horizontalScale = ${details.horizontalScale}; details.verticalScale = ${details.verticalScale})');
|
||||||
|
|
||||||
|
if (1.0 != details.scale) {
|
||||||
|
_scale = (_previousScale * details.scale).clamp(1.0, 10.0);
|
||||||
|
playerRatioProvide.changeScale(_scale);
|
||||||
|
// 限制放大倍数 1~10倍
|
||||||
|
_offset = _clampOffset(details.focalPoint - _normalizedOffset * _scale);
|
||||||
|
} else {
|
||||||
|
_deltaPoint = _clampdeltaPoint(details.focalPoint - _focalPoint);
|
||||||
|
_focalPoint = details.focalPoint;
|
||||||
|
print('_deltaPoint = (${_deltaPoint.dx}, ${_deltaPoint.dy})');
|
||||||
|
playerRatioProvide.changeDeltaX(_deltaPoint.dx);
|
||||||
|
playerRatioProvide.changeDeltaY(_deltaPoint.dy);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 更新当前位置
|
||||||
|
playerRatioProvide.changeOffset(_offset);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
Offset _clampdeltaPoint(Offset delta) {
|
||||||
|
final Size size = context.size; // widget的屏幕尺寸
|
||||||
|
double rate = 2.0;
|
||||||
|
Offset deltaPoint =
|
||||||
|
Offset((rate * delta.dx / size.width), (rate * delta.dy / size.height));
|
||||||
|
_deltaPoint -= deltaPoint;
|
||||||
|
return Offset(
|
||||||
|
_deltaPoint.dx.clamp(-1.0, 1.0), _deltaPoint.dy.clamp(-1.0, 1.0));
|
||||||
|
}
|
||||||
|
|
||||||
|
Offset _clampOffset(Offset offset) {
|
||||||
|
final Size size = context.size;
|
||||||
|
// widget的屏幕宽度
|
||||||
|
final Offset minOffset = Offset(size.width, size.height) * (1.0 - _scale);
|
||||||
|
// 限制他的最小尺寸
|
||||||
|
return Offset(
|
||||||
|
offset.dx.clamp(minOffset.dx, 0.0), offset.dy.clamp(minOffset.dy, 0.0));
|
||||||
|
}
|
||||||
|
|
||||||
|
void _handleOnScaleEnd(ScaleEndDetails details) {
|
||||||
|
final double magnitude = details.velocity.pixelsPerSecond.distance;
|
||||||
|
if (magnitude < _kMinFlingVelocity) return;
|
||||||
|
final Offset direction = details.velocity.pixelsPerSecond / magnitude;
|
||||||
|
// 计算当前的方向
|
||||||
|
final double distance = (Offset.zero & context.size).shortestSide;
|
||||||
|
// 计算放大倍速,并相应的放大宽和高,比如原来是600*480的图片,放大后倍数为1.25倍时,宽和高是同时变化的
|
||||||
|
_animation = _controller.drive(Tween<Offset>(
|
||||||
|
begin: _offset, end: _clampOffset(_offset + direction * distance)));
|
||||||
|
_controller
|
||||||
|
..value = 0.0
|
||||||
|
..fling(velocity: magnitude / 1000.0);
|
||||||
|
_bScaleing = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
playerRatioProvide = Provider.of<PlayerRatioProvide>(context);
|
||||||
|
Rect rect = panelRect();
|
||||||
|
|
||||||
|
List ws = <Widget>[];
|
||||||
|
|
||||||
|
if (_statelessTimer != null && _statelessTimer.isActive) {
|
||||||
|
ws.add(buildStateless());
|
||||||
|
} else if (player.state == FijkState.asyncPreparing) {
|
||||||
|
ws.add(buildStateless());
|
||||||
|
} else if (player.state == FijkState.error) {
|
||||||
|
ws.add(buildStateless());
|
||||||
|
} else if (myImageProvider != null) {
|
||||||
|
ws.add(buildStateless());
|
||||||
|
}
|
||||||
|
ws.add(buildGestureDetector(context));
|
||||||
|
if (widget.onBack != null) {
|
||||||
|
ws.add(buildBack(context));
|
||||||
|
}
|
||||||
|
return Positioned.fromRect(
|
||||||
|
rect: rect,
|
||||||
|
child: Stack(children: ws),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,244 @@
|
|||||||
|
//MIT License
|
||||||
|
//
|
||||||
|
//Copyright (c) [2019] [Befovy]
|
||||||
|
//
|
||||||
|
//Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
//of this software and associated documentation files (the "Software"), to deal
|
||||||
|
//in the Software without restriction, including without limitation the rights
|
||||||
|
//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
//copies of the Software, and to permit persons to whom the Software is
|
||||||
|
//furnished to do so, subject to the following conditions:
|
||||||
|
//
|
||||||
|
//The above copyright notice and this permission notice shall be included in all
|
||||||
|
//copies or substantial portions of the Software.
|
||||||
|
//
|
||||||
|
//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
//SOFTWARE.
|
||||||
|
|
||||||
|
//part of fijkplayer;
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'dart:core';
|
||||||
|
import 'dart:math';
|
||||||
|
import 'dart:ui';
|
||||||
|
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:flutter/foundation.dart';
|
||||||
|
import 'package:flutter/rendering.dart';
|
||||||
|
import 'package:flutter/widgets.dart';
|
||||||
|
|
||||||
|
/// MyFijkSlider is like Slider in Flutter SDK.
|
||||||
|
/// MyFijkSlider support [cacheValue] which can be used
|
||||||
|
/// to show the player's cached buffer.
|
||||||
|
/// The [colors] is used to make colorful painter to draw the line and circle.
|
||||||
|
class MyFijkSlider extends StatefulWidget {
|
||||||
|
final double value;
|
||||||
|
final double cacheValue;
|
||||||
|
|
||||||
|
final ValueChanged<double> onChanged;
|
||||||
|
final ValueChanged<double> onChangeStart;
|
||||||
|
final ValueChanged<double> onChangeEnd;
|
||||||
|
|
||||||
|
final double min;
|
||||||
|
final double max;
|
||||||
|
|
||||||
|
final MyFijkSliderColors colors;
|
||||||
|
|
||||||
|
const MyFijkSlider({
|
||||||
|
Key key,
|
||||||
|
@required this.value,
|
||||||
|
@required this.onChanged,
|
||||||
|
this.cacheValue = 0.0,
|
||||||
|
this.onChangeStart,
|
||||||
|
this.onChangeEnd,
|
||||||
|
this.min = 0.0,
|
||||||
|
this.max = 1.0,
|
||||||
|
this.colors = const MyFijkSliderColors(),
|
||||||
|
}) : assert(value != null),
|
||||||
|
assert(cacheValue != null),
|
||||||
|
assert(min != null),
|
||||||
|
assert(max != null),
|
||||||
|
assert(min <= max),
|
||||||
|
assert(value >= min && value <= max),
|
||||||
|
super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<StatefulWidget> createState() {
|
||||||
|
return _MyFijkSliderState();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class _MyFijkSliderState extends State<MyFijkSlider> {
|
||||||
|
bool dragging = false;
|
||||||
|
|
||||||
|
double dragValue;
|
||||||
|
|
||||||
|
static const double margin = 2.0;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
double v = widget.value / (widget.max - widget.min);
|
||||||
|
double cv = widget.cacheValue / (widget.max - widget.min);
|
||||||
|
|
||||||
|
return GestureDetector(
|
||||||
|
child: Container(
|
||||||
|
margin: EdgeInsets.only(left: margin, right: margin),
|
||||||
|
height: double.infinity,
|
||||||
|
width: double.infinity,
|
||||||
|
color: Colors.transparent,
|
||||||
|
child: CustomPaint(
|
||||||
|
painter: _MySliderPainter(v, cv, dragging, colors: widget.colors),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
onHorizontalDragStart: (DragStartDetails details) {
|
||||||
|
setState(() {
|
||||||
|
dragging = true;
|
||||||
|
});
|
||||||
|
dragValue = widget.value;
|
||||||
|
if (widget.onChangeStart != null) {
|
||||||
|
widget.onChangeStart(dragValue);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onHorizontalDragUpdate: (DragUpdateDetails details) {
|
||||||
|
final box = context.findRenderObject() as RenderBox;
|
||||||
|
final dx = details.localPosition.dx;
|
||||||
|
dragValue = (dx - margin) / (box.size.width - 2 * margin);
|
||||||
|
dragValue = max(0, min(1, dragValue));
|
||||||
|
dragValue = dragValue * (widget.max - widget.min) + widget.min;
|
||||||
|
if (widget.onChanged != null) {
|
||||||
|
widget.onChanged(dragValue);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onHorizontalDragEnd: (DragEndDetails details) {
|
||||||
|
setState(() {
|
||||||
|
dragging = false;
|
||||||
|
});
|
||||||
|
if (widget.onChangeEnd != null) {
|
||||||
|
widget.onChangeEnd(dragValue);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Colors for the MyFijkSlider
|
||||||
|
class MyFijkSliderColors {
|
||||||
|
const MyFijkSliderColors({
|
||||||
|
this.playedColor = const Color.fromRGBO(255, 0, 0, 0.6),
|
||||||
|
this.bufferedColor = const Color.fromRGBO(50, 50, 100, 0.4),
|
||||||
|
this.cursorColor = const Color.fromRGBO(255, 0, 0, 0.8),
|
||||||
|
this.baselineColor = const Color.fromRGBO(200, 200, 200, 0.5),
|
||||||
|
});
|
||||||
|
|
||||||
|
final Color playedColor;
|
||||||
|
final Color bufferedColor;
|
||||||
|
final Color cursorColor;
|
||||||
|
final Color baselineColor;
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) =>
|
||||||
|
identical(this, other) ||
|
||||||
|
other is MyFijkSliderColors &&
|
||||||
|
runtimeType == other.runtimeType &&
|
||||||
|
hashCode == other.hashCode;
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode =>
|
||||||
|
hashValues(playedColor, bufferedColor, cursorColor, baselineColor);
|
||||||
|
}
|
||||||
|
|
||||||
|
class _MySliderPainter extends CustomPainter {
|
||||||
|
final double v;
|
||||||
|
final double cv;
|
||||||
|
|
||||||
|
final bool dragging;
|
||||||
|
final Paint pt = Paint();
|
||||||
|
|
||||||
|
final MyFijkSliderColors colors;
|
||||||
|
|
||||||
|
_MySliderPainter(this.v, this.cv, this.dragging,
|
||||||
|
{this.colors = const MyFijkSliderColors()})
|
||||||
|
: assert(colors != null),
|
||||||
|
assert(v != null),
|
||||||
|
assert(cv != null);
|
||||||
|
|
||||||
|
@override
|
||||||
|
void paint(Canvas canvas, Size size) {
|
||||||
|
double lineHeight = min(size.height / 2, 1);
|
||||||
|
pt.color = colors.baselineColor;
|
||||||
|
|
||||||
|
double radius = min(size.height / 2, 4);
|
||||||
|
// draw background
|
||||||
|
canvas.drawRRect(
|
||||||
|
RRect.fromRectAndRadius(
|
||||||
|
Rect.fromPoints(
|
||||||
|
Offset(0, size.height / 2 - lineHeight),
|
||||||
|
Offset(size.width, size.height / 2 + lineHeight),
|
||||||
|
),
|
||||||
|
Radius.circular(radius),
|
||||||
|
),
|
||||||
|
pt,
|
||||||
|
);
|
||||||
|
|
||||||
|
final double value = v * size.width;
|
||||||
|
|
||||||
|
// draw played part
|
||||||
|
pt.color = colors.playedColor;
|
||||||
|
canvas.drawRRect(
|
||||||
|
RRect.fromRectAndRadius(
|
||||||
|
Rect.fromPoints(
|
||||||
|
Offset(0, size.height / 2 - lineHeight),
|
||||||
|
Offset(value, size.height / 2 + lineHeight),
|
||||||
|
),
|
||||||
|
Radius.circular(radius),
|
||||||
|
),
|
||||||
|
pt,
|
||||||
|
);
|
||||||
|
|
||||||
|
// draw cached part
|
||||||
|
final double cacheValue = cv * size.width;
|
||||||
|
if (cacheValue > value && cacheValue > 0) {
|
||||||
|
pt.color = colors.bufferedColor;
|
||||||
|
canvas.drawRRect(
|
||||||
|
RRect.fromRectAndRadius(
|
||||||
|
Rect.fromPoints(
|
||||||
|
Offset(value, size.height / 2 - lineHeight),
|
||||||
|
Offset(cacheValue, size.height / 2 + lineHeight),
|
||||||
|
),
|
||||||
|
Radius.circular(radius),
|
||||||
|
),
|
||||||
|
pt,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
//注意:改变拖动圆形光标,必须按Q退出App,再重新flutter run才能生效
|
||||||
|
// draw circle cursor
|
||||||
|
// pt.color = colors.cursorColor;
|
||||||
|
// pt.color = pt.color.withAlpha(max(0, pt.color.alpha - 50));
|
||||||
|
//radius = min(size.height / 2, dragging ? 10 : 5);
|
||||||
|
pt.color = Colors.red;
|
||||||
|
//radius = 10;
|
||||||
|
radius = min(size.height / 2, 10);
|
||||||
|
canvas.drawCircle(Offset(value, size.height / 2), radius, pt);
|
||||||
|
//pt.color = colors.cursorColor;
|
||||||
|
//radius = min(size.height / 2, dragging ? 6 : 3);
|
||||||
|
//canvas.drawCircle(Offset(value, size.height / 2), radius, pt);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) =>
|
||||||
|
identical(this, other) ||
|
||||||
|
other is _MySliderPainter && hashCode == other.hashCode;
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode => hashValues(v, cv, dragging, colors);
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool shouldRepaint(_MySliderPainter oldDelegate) {
|
||||||
|
return hashCode != oldDelegate.hashCode;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
package io.flutter.plugins;
|
||||||
|
|
||||||
|
import io.flutter.plugin.common.PluginRegistry;
|
||||||
|
import com.baidu.flutter_bmfbase.FlutterBmfbasePlugin;
|
||||||
|
import com.baidu.flutter_bmfmap.FlutterBmfmapPlugin;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generated file. Do not edit.
|
||||||
|
*/
|
||||||
|
public final class GeneratedPluginRegistrant {
|
||||||
|
public static void registerWith(PluginRegistry registry) {
|
||||||
|
if (alreadyRegisteredWith(registry)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
FlutterBmfbasePlugin.registerWith(registry.registrarFor("com.baidu.flutter_bmfbase.FlutterBmfbasePlugin"));
|
||||||
|
FlutterBmfmapPlugin.registerWith(registry.registrarFor("com.baidu.flutter_bmfmap.FlutterBmfmapPlugin"));
|
||||||
|
}
|
||||||
|
|
||||||
|
private static boolean alreadyRegisteredWith(PluginRegistry registry) {
|
||||||
|
final String key = GeneratedPluginRegistrant.class.getCanonicalName();
|
||||||
|
if (registry.hasPlugin(key)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
registry.registrarFor(key);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
// This is a generated file; do not edit or check into version control.
|
||||||
|
FLUTTER_ROOT=/Users/mlch911/fvm/versions/1.22.6
|
||||||
|
FLUTTER_APPLICATION_PATH=/Users/mlch911/Documents/Programming/flutter/hyzp_ybqx/lib/my_flutter_bmfmap-1.0.2
|
||||||
|
FLUTTER_TARGET=lib/main.dart
|
||||||
|
FLUTTER_BUILD_DIR=build
|
||||||
|
SYMROOT=${SOURCE_ROOT}/../build/ios
|
||||||
|
OTHER_LDFLAGS=$(inherited) -framework Flutter
|
||||||
|
FLUTTER_FRAMEWORK_DIR=/Users/mlch911/fvm/versions/1.22.6/bin/cache/artifacts/engine/ios
|
||||||
|
FLUTTER_BUILD_NAME=1.0.2
|
||||||
|
FLUTTER_BUILD_NUMBER=1.0.2
|
||||||
|
DART_OBFUSCATION=false
|
||||||
|
TRACK_WIDGET_CREATION=false
|
||||||
|
TREE_SHAKE_ICONS=false
|
||||||
|
PACKAGE_CONFIG=.packages
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# This is a generated file; do not edit or check into version control.
|
||||||
|
export "FLUTTER_ROOT=/Users/mlch911/fvm/versions/1.22.6"
|
||||||
|
export "FLUTTER_APPLICATION_PATH=/Users/mlch911/Documents/Programming/flutter/hyzp_ybqx/lib/my_flutter_bmfmap-1.0.2"
|
||||||
|
export "FLUTTER_TARGET=lib/main.dart"
|
||||||
|
export "FLUTTER_BUILD_DIR=build"
|
||||||
|
export "SYMROOT=${SOURCE_ROOT}/../build/ios"
|
||||||
|
export "OTHER_LDFLAGS=$(inherited) -framework Flutter"
|
||||||
|
export "FLUTTER_FRAMEWORK_DIR=/Users/mlch911/fvm/versions/1.22.6/bin/cache/artifacts/engine/ios"
|
||||||
|
export "FLUTTER_BUILD_NAME=1.0.2"
|
||||||
|
export "FLUTTER_BUILD_NUMBER=1.0.2"
|
||||||
|
export "DART_OBFUSCATION=false"
|
||||||
|
export "TRACK_WIDGET_CREATION=false"
|
||||||
|
export "TREE_SHAKE_ICONS=false"
|
||||||
|
export "PACKAGE_CONFIG=.packages"
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
//
|
||||||
|
// Generated file. Do not edit.
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifndef GeneratedPluginRegistrant_h
|
||||||
|
#define GeneratedPluginRegistrant_h
|
||||||
|
|
||||||
|
#import <Flutter/Flutter.h>
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
@interface GeneratedPluginRegistrant : NSObject
|
||||||
|
+ (void)registerWithRegistry:(NSObject<FlutterPluginRegistry>*)registry;
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
|
#endif /* GeneratedPluginRegistrant_h */
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
//
|
||||||
|
// Generated file. Do not edit.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "GeneratedPluginRegistrant.h"
|
||||||
|
|
||||||
|
#if __has_include(<flutter_bmfbase/FlutterBmfbasePlugin.h>)
|
||||||
|
#import <flutter_bmfbase/FlutterBmfbasePlugin.h>
|
||||||
|
#else
|
||||||
|
@import flutter_bmfbase;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if __has_include(<flutter_bmfmap/FlutterBmfmapPlugin.h>)
|
||||||
|
#import <flutter_bmfmap/FlutterBmfmapPlugin.h>
|
||||||
|
#else
|
||||||
|
@import flutter_bmfmap;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
@implementation GeneratedPluginRegistrant
|
||||||
|
|
||||||
|
+ (void)registerWithRegistry:(NSObject<FlutterPluginRegistry>*)registry {
|
||||||
|
[FlutterBmfbasePlugin registerWithRegistrar:[registry registrarForPlugin:@"FlutterBmfbasePlugin"]];
|
||||||
|
[FlutterBmfmapPlugin registerWithRegistrar:[registry registrarForPlugin:@"FlutterBmfmapPlugin"]];
|
||||||
|
}
|
||||||
|
|
||||||
|
@end
|
||||||
@@ -1,2 +1,2 @@
|
|||||||
sdk.dir=S:\\Android\\Android-SDK-Windows
|
sdk.dir=/Users/mlch911/Library/Android/sdk
|
||||||
flutter.sdk=R:\\Flutter\\FlutterSDK\\1.22.6
|
flutter.sdk=/Users/mlch911/fvm/versions/1.22.6
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
// This is a generated file; do not edit or check into version control.
|
||||||
|
FLUTTER_ROOT=/Users/mlch911/fvm/versions/1.22.6
|
||||||
|
FLUTTER_APPLICATION_PATH=/Users/mlch911/Documents/Programming/flutter/hyzp_ybqx/lib/my_flutter_drag_scale/example
|
||||||
|
FLUTTER_TARGET=lib/main.dart
|
||||||
|
FLUTTER_BUILD_DIR=build
|
||||||
|
SYMROOT=${SOURCE_ROOT}/../build/ios
|
||||||
|
OTHER_LDFLAGS=$(inherited) -framework Flutter
|
||||||
|
FLUTTER_FRAMEWORK_DIR=/Users/mlch911/fvm/versions/1.22.6/bin/cache/artifacts/engine/ios
|
||||||
|
FLUTTER_BUILD_NAME=1.0.0
|
||||||
|
FLUTTER_BUILD_NUMBER=1
|
||||||
|
DART_OBFUSCATION=false
|
||||||
|
TRACK_WIDGET_CREATION=false
|
||||||
|
TREE_SHAKE_ICONS=false
|
||||||
|
PACKAGE_CONFIG=.packages
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# This is a generated file; do not edit or check into version control.
|
||||||
|
export "FLUTTER_ROOT=/Users/mlch911/fvm/versions/1.22.6"
|
||||||
|
export "FLUTTER_APPLICATION_PATH=/Users/mlch911/Documents/Programming/flutter/hyzp_ybqx/lib/my_flutter_drag_scale/example"
|
||||||
|
export "FLUTTER_TARGET=lib/main.dart"
|
||||||
|
export "FLUTTER_BUILD_DIR=build"
|
||||||
|
export "SYMROOT=${SOURCE_ROOT}/../build/ios"
|
||||||
|
export "OTHER_LDFLAGS=$(inherited) -framework Flutter"
|
||||||
|
export "FLUTTER_FRAMEWORK_DIR=/Users/mlch911/fvm/versions/1.22.6/bin/cache/artifacts/engine/ios"
|
||||||
|
export "FLUTTER_BUILD_NAME=1.0.0"
|
||||||
|
export "FLUTTER_BUILD_NUMBER=1"
|
||||||
|
export "DART_OBFUSCATION=false"
|
||||||
|
export "TRACK_WIDGET_CREATION=false"
|
||||||
|
export "TREE_SHAKE_ICONS=false"
|
||||||
|
export "PACKAGE_CONFIG=.packages"
|
||||||
@@ -8,12 +8,12 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_test/flutter_test.dart';
|
import 'package:flutter_test/flutter_test.dart';
|
||||||
|
|
||||||
import 'package:flutter_drag_scale_example/main.dart';
|
// import 'package:flutter_drag_scale_example/main.dart';
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
testWidgets('Verify Platform version', (WidgetTester tester) async {
|
testWidgets('Verify Platform version', (WidgetTester tester) async {
|
||||||
// Build our app and trigger a frame.
|
// Build our app and trigger a frame.
|
||||||
await tester.pumpWidget(MyApp());
|
// await tester.pumpWidget(MyApp());
|
||||||
|
|
||||||
// Verify that platform version is retrieved.
|
// Verify that platform version is retrieved.
|
||||||
expect(
|
expect(
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ public class SuperPlayerImpl implements SuperPlayer, ITXVodPlayListener, ITXLive
|
|||||||
case TXLiveConstants.PLAY_ERR_NET_DISCONNECT:
|
case TXLiveConstants.PLAY_ERR_NET_DISCONNECT:
|
||||||
case TXLiveConstants.PLAY_EVT_PLAY_END:
|
case TXLiveConstants.PLAY_EVT_PLAY_END:
|
||||||
if (mCurrentPlayType == SuperPlayerDef.PlayerType.LIVE_SHIFT) { // 直播时移失败,返回直播
|
if (mCurrentPlayType == SuperPlayerDef.PlayerType.LIVE_SHIFT) { // 直播时移失败,返回直播
|
||||||
mLivePlayer.resumeLive();
|
// mLivePlayer.resumeLive();
|
||||||
updatePlayerType(SuperPlayerDef.PlayerType.LIVE);
|
updatePlayerType(SuperPlayerDef.PlayerType.LIVE);
|
||||||
onError(SuperPlayerCode.LIVE_SHIFT_FAIL, "时移失败,返回直播");
|
onError(SuperPlayerCode.LIVE_SHIFT_FAIL, "时移失败,返回直播");
|
||||||
updatePlayerState(SuperPlayerDef.PlayerState.PLAYING);
|
updatePlayerState(SuperPlayerDef.PlayerState.PLAYING);
|
||||||
@@ -398,7 +398,10 @@ public class SuperPlayerImpl implements SuperPlayer, ITXVodPlayListener, ITXLive
|
|||||||
mCurrentPlayVideoURL = url;
|
mCurrentPlayVideoURL = url;
|
||||||
if (mLivePlayer != null) {
|
if (mLivePlayer != null) {
|
||||||
mLivePlayer.setPlayListener(this);
|
mLivePlayer.setPlayListener(this);
|
||||||
int result = mLivePlayer.startPlay(url, playType); // result返回值:0 success; -1 empty url; -2 invalid url; -3 invalid playType;
|
// 由于腾讯播放器SDK在2022-10-11进行更新,导致hyzp_ybqx项目编译出现下面报错。将下面文件
|
||||||
|
//\hyzp_ybqx\lib\my_flutter_superplayer\android\src\main\java\com\tencent\liteav\demo\superplayer\model\SuperPlayerImpl.java
|
||||||
|
//中的TXLivePlayer 的 startPlay 变更为 startLivePlay,将TXVodPlayer 的 startPlay 变更为 startVodPlay,问题解决。
|
||||||
|
int result = mLivePlayer.startLivePlay(url, playType); // result返回值:0 success; -1 empty url; -2 invalid url; -3 invalid playType;
|
||||||
if (result != 0) {
|
if (result != 0) {
|
||||||
TXCLog.e(TAG, "playLiveURL videoURL:" + url + ",result:" + result);
|
TXCLog.e(TAG, "playLiveURL videoURL:" + url + ",result:" + result);
|
||||||
} else {
|
} else {
|
||||||
@@ -449,9 +452,9 @@ public class SuperPlayerImpl implements SuperPlayer, ITXVodPlayListener, ITXLive
|
|||||||
query += "spfileid=" + mFileId + "&spdrmtype=" + drmType + "&spappid=" + mAppId;
|
query += "spfileid=" + mFileId + "&spdrmtype=" + drmType + "&spappid=" + mAppId;
|
||||||
Uri newUri = uri.buildUpon().query(query).build();
|
Uri newUri = uri.buildUpon().query(query).build();
|
||||||
TXCLog.i(TAG, "playVodURL: newurl = " + Uri.decode(newUri.toString()) + " ;url= " + url);
|
TXCLog.i(TAG, "playVodURL: newurl = " + Uri.decode(newUri.toString()) + " ;url= " + url);
|
||||||
ret = mVodPlayer.startPlay(Uri.decode(newUri.toString()));
|
ret = mVodPlayer.startVodPlay(Uri.decode(newUri.toString()));
|
||||||
} else {
|
} else {
|
||||||
ret = mVodPlayer.startPlay(url);
|
ret = mVodPlayer.startVodPlay(url);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ret == 0) {
|
if (ret == 0) {
|
||||||
@@ -498,7 +501,7 @@ public class SuperPlayerImpl implements SuperPlayer, ITXVodPlayListener, ITXLive
|
|||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
TXCLog.e(TAG, "playTimeShiftLiveURL: bizidNum error = " + bizid);
|
TXCLog.e(TAG, "playTimeShiftLiveURL: bizidNum error = " + bizid);
|
||||||
}
|
}
|
||||||
mLivePlayer.prepareLiveSeek(domian, bizidNum);
|
// mLivePlayer.prepareLiveSeek(domian, bizidNum);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -730,7 +733,7 @@ public class SuperPlayerImpl implements SuperPlayer, ITXVodPlayListener, ITXLive
|
|||||||
@Override
|
@Override
|
||||||
public void resumeLive() {
|
public void resumeLive() {
|
||||||
if (mCurrentPlayType == SuperPlayerDef.PlayerType.LIVE_SHIFT) {
|
if (mCurrentPlayType == SuperPlayerDef.PlayerType.LIVE_SHIFT) {
|
||||||
mLivePlayer.resumeLive();
|
// mLivePlayer.resumeLive();
|
||||||
}
|
}
|
||||||
updatePlayerType(SuperPlayerDef.PlayerType.LIVE);
|
updatePlayerType(SuperPlayerDef.PlayerType.LIVE);
|
||||||
}
|
}
|
||||||
@@ -805,7 +808,7 @@ public class SuperPlayerImpl implements SuperPlayer, ITXVodPlayListener, ITXLive
|
|||||||
updatePlayerType(SuperPlayerDef.PlayerType.LIVE_SHIFT);
|
updatePlayerType(SuperPlayerDef.PlayerType.LIVE_SHIFT);
|
||||||
LogReport.getInstance().uploadLogs(LogReport.ELK_ACTION_TIMESHIFT, 0, 0);
|
LogReport.getInstance().uploadLogs(LogReport.ELK_ACTION_TIMESHIFT, 0, 0);
|
||||||
if (mLivePlayer != null) {
|
if (mLivePlayer != null) {
|
||||||
mLivePlayer.seek(position);
|
// mLivePlayer.seek(position);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (mObserver != null) {
|
if (mObserver != null) {
|
||||||
@@ -856,7 +859,7 @@ public class SuperPlayerImpl implements SuperPlayer, ITXVodPlayListener, ITXLive
|
|||||||
mVodPlayer.stopPlay(true);
|
mVodPlayer.stopPlay(true);
|
||||||
TXCLog.i(TAG, "onQualitySelect quality.url:" + quality.url);
|
TXCLog.i(TAG, "onQualitySelect quality.url:" + quality.url);
|
||||||
mVodPlayer.setStartTime(currentTime);
|
mVodPlayer.setStartTime(currentTime);
|
||||||
mVodPlayer.startPlay(quality.url);
|
mVodPlayer.startVodPlay(quality.url);
|
||||||
} else { //br!=0;index!=-1;url=null
|
} else { //br!=0;index!=-1;url=null
|
||||||
TXCLog.i(TAG, "setBitrateIndex quality.index:" + quality.index);
|
TXCLog.i(TAG, "setBitrateIndex quality.index:" + quality.index);
|
||||||
// 说明是多bitrate的m3u8子流,会自动无缝seek
|
// 说明是多bitrate的m3u8子流,会自动无缝seek
|
||||||
|
|||||||
@@ -5,56 +5,56 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: async
|
name: async
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.5.0-nullsafety.1"
|
version: "2.5.0-nullsafety.1"
|
||||||
boolean_selector:
|
boolean_selector:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: boolean_selector
|
name: boolean_selector
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.0-nullsafety.1"
|
version: "2.1.0-nullsafety.1"
|
||||||
characters:
|
characters:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: characters
|
name: characters
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.1.0-nullsafety.3"
|
version: "1.1.0-nullsafety.3"
|
||||||
charcode:
|
charcode:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: charcode
|
name: charcode
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.2.0-nullsafety.1"
|
version: "1.2.0-nullsafety.1"
|
||||||
clock:
|
clock:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: clock
|
name: clock
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.1.0-nullsafety.1"
|
version: "1.1.0-nullsafety.1"
|
||||||
collection:
|
collection:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: collection
|
name: collection
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.15.0-nullsafety.3"
|
version: "1.15.0-nullsafety.3"
|
||||||
cupertino_icons:
|
cupertino_icons:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: cupertino_icons
|
name: cupertino_icons
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.0"
|
version: "1.0.0"
|
||||||
fake_async:
|
fake_async:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: fake_async
|
name: fake_async
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.2.0-nullsafety.1"
|
version: "1.2.0-nullsafety.1"
|
||||||
flutter:
|
flutter:
|
||||||
@@ -78,21 +78,21 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: matcher
|
name: matcher
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.12.10-nullsafety.1"
|
version: "0.12.10-nullsafety.1"
|
||||||
meta:
|
meta:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: meta
|
name: meta
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.3.0-nullsafety.3"
|
version: "1.3.0-nullsafety.3"
|
||||||
path:
|
path:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: path
|
name: path
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.8.0-nullsafety.1"
|
version: "1.8.0-nullsafety.1"
|
||||||
sky_engine:
|
sky_engine:
|
||||||
@@ -104,56 +104,56 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: source_span
|
name: source_span
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.8.0-nullsafety.2"
|
version: "1.8.0-nullsafety.2"
|
||||||
stack_trace:
|
stack_trace:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: stack_trace
|
name: stack_trace
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.10.0-nullsafety.1"
|
version: "1.10.0-nullsafety.1"
|
||||||
stream_channel:
|
stream_channel:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: stream_channel
|
name: stream_channel
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.0-nullsafety.1"
|
version: "2.1.0-nullsafety.1"
|
||||||
string_scanner:
|
string_scanner:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: string_scanner
|
name: string_scanner
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.1.0-nullsafety.1"
|
version: "1.1.0-nullsafety.1"
|
||||||
term_glyph:
|
term_glyph:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: term_glyph
|
name: term_glyph
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.2.0-nullsafety.1"
|
version: "1.2.0-nullsafety.1"
|
||||||
test_api:
|
test_api:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: test_api
|
name: test_api
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.2.19-nullsafety.2"
|
version: "0.2.19-nullsafety.2"
|
||||||
typed_data:
|
typed_data:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: typed_data
|
name: typed_data
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.3.0-nullsafety.3"
|
version: "1.3.0-nullsafety.3"
|
||||||
vector_math:
|
vector_math:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: vector_math
|
name: vector_math
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.0-nullsafety.3"
|
version: "2.1.0-nullsafety.3"
|
||||||
sdks:
|
sdks:
|
||||||
|
|||||||
@@ -5,49 +5,49 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: async
|
name: async
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.5.0-nullsafety.1"
|
version: "2.5.0-nullsafety.1"
|
||||||
boolean_selector:
|
boolean_selector:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: boolean_selector
|
name: boolean_selector
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.0-nullsafety.1"
|
version: "2.1.0-nullsafety.1"
|
||||||
characters:
|
characters:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: characters
|
name: characters
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.1.0-nullsafety.3"
|
version: "1.1.0-nullsafety.3"
|
||||||
charcode:
|
charcode:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: charcode
|
name: charcode
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.2.0-nullsafety.1"
|
version: "1.2.0-nullsafety.1"
|
||||||
clock:
|
clock:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: clock
|
name: clock
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.1.0-nullsafety.1"
|
version: "1.1.0-nullsafety.1"
|
||||||
collection:
|
collection:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: collection
|
name: collection
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.15.0-nullsafety.3"
|
version: "1.15.0-nullsafety.3"
|
||||||
fake_async:
|
fake_async:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: fake_async
|
name: fake_async
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.2.0-nullsafety.1"
|
version: "1.2.0-nullsafety.1"
|
||||||
flutter:
|
flutter:
|
||||||
@@ -64,21 +64,21 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: matcher
|
name: matcher
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.12.10-nullsafety.1"
|
version: "0.12.10-nullsafety.1"
|
||||||
meta:
|
meta:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: meta
|
name: meta
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.3.0-nullsafety.3"
|
version: "1.3.0-nullsafety.3"
|
||||||
path:
|
path:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: path
|
name: path
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.8.0-nullsafety.1"
|
version: "1.8.0-nullsafety.1"
|
||||||
sky_engine:
|
sky_engine:
|
||||||
@@ -90,56 +90,56 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: source_span
|
name: source_span
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.8.0-nullsafety.2"
|
version: "1.8.0-nullsafety.2"
|
||||||
stack_trace:
|
stack_trace:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: stack_trace
|
name: stack_trace
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.10.0-nullsafety.1"
|
version: "1.10.0-nullsafety.1"
|
||||||
stream_channel:
|
stream_channel:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: stream_channel
|
name: stream_channel
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.0-nullsafety.1"
|
version: "2.1.0-nullsafety.1"
|
||||||
string_scanner:
|
string_scanner:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: string_scanner
|
name: string_scanner
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.1.0-nullsafety.1"
|
version: "1.1.0-nullsafety.1"
|
||||||
term_glyph:
|
term_glyph:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: term_glyph
|
name: term_glyph
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.2.0-nullsafety.1"
|
version: "1.2.0-nullsafety.1"
|
||||||
test_api:
|
test_api:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: test_api
|
name: test_api
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.2.19-nullsafety.2"
|
version: "0.2.19-nullsafety.2"
|
||||||
typed_data:
|
typed_data:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: typed_data
|
name: typed_data
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.3.0-nullsafety.3"
|
version: "1.3.0-nullsafety.3"
|
||||||
vector_math:
|
vector_math:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: vector_math
|
name: vector_math
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.0-nullsafety.3"
|
version: "2.1.0-nullsafety.3"
|
||||||
sdks:
|
sdks:
|
||||||
|
|||||||
@@ -4,8 +4,10 @@ import 'package:flutter_bmfmap/BaiduMap/bmfmap_map.dart';
|
|||||||
import 'package:flutter_screenutil/screen_util.dart';
|
import 'package:flutter_screenutil/screen_util.dart';
|
||||||
import 'package:hyzp_ybqx/components/commonFun.dart';
|
import 'package:hyzp_ybqx/components/commonFun.dart';
|
||||||
import 'package:hyzp_ybqx/components/hyxx_data_handle.dart';
|
import 'package:hyzp_ybqx/components/hyxx_data_handle.dart';
|
||||||
|
import 'package:map_launcher/map_launcher.dart';
|
||||||
|
|
||||||
import '../../../components/dioFun.dart';
|
import '../../../components/dioFun.dart';
|
||||||
|
import '../../../services/Storage.dart';
|
||||||
import 'dwInfoDialog.dart';
|
import 'dwInfoDialog.dart';
|
||||||
import 'dwInfo_data.dart';
|
import 'dwInfo_data.dart';
|
||||||
|
|
||||||
@@ -20,6 +22,11 @@ class BasicMap extends StatefulWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _BasicMapState extends State<BasicMap> {
|
class _BasicMapState extends State<BasicMap> {
|
||||||
|
// 导航相关代码
|
||||||
|
double destinationLatitude = 28.45382237207785;
|
||||||
|
double destinationLongitude = 104.7506958256658;
|
||||||
|
String destinationTitle = '珙县大坪上';
|
||||||
|
|
||||||
Size screenSize;
|
Size screenSize;
|
||||||
BMFMapOptions mapOptions;
|
BMFMapOptions mapOptions;
|
||||||
BMFMapController myMapController;
|
BMFMapController myMapController;
|
||||||
@@ -32,9 +39,18 @@ class _BasicMapState extends State<BasicMap> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
List<AvailableMap> availableMaps;
|
||||||
|
|
||||||
|
void init() async {
|
||||||
|
// 获取用户选择的默认地图
|
||||||
|
availableMaps = await MapLauncher.installedMaps;
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
|
init();
|
||||||
|
|
||||||
mapOptions = BMFMapOptions(
|
mapOptions = BMFMapOptions(
|
||||||
//center: BMFCoordinate(39.965, 116.404),//北京市
|
//center: BMFCoordinate(39.965, 116.404),//北京市
|
||||||
//30 116.395645038,39.9299857781 北京-北京市
|
//30 116.395645038,39.9299857781 北京-北京市
|
||||||
@@ -291,8 +307,17 @@ class _BasicMapState extends State<BasicMap> {
|
|||||||
.push(
|
.push(
|
||||||
PageRouteBuilder(
|
PageRouteBuilder(
|
||||||
opaque: false,
|
opaque: false,
|
||||||
pageBuilder: (context, animation, secondaryAnimation) =>
|
pageBuilder: (context, animation, secondaryAnimation) => dwInfoDialog(
|
||||||
dwInfoDialog(id: id, dwIndex: dwIndex, title: title, content: content),
|
id: id,
|
||||||
|
dwIndex: dwIndex,
|
||||||
|
title: title,
|
||||||
|
content: content,
|
||||||
|
parentContext: context,
|
||||||
|
destinationLatitude: double.parse(listCoordinate[1]),
|
||||||
|
destinationLongitude: double.parse(listCoordinate[0]),
|
||||||
|
destinationTitle: listDwinfoGetList2[dwIndex]["dwmc"],
|
||||||
|
availableMaps: availableMaps,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
.then((value) async {
|
.then((value) async {
|
||||||
|
|||||||
@@ -1,21 +1,37 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:hyzp_ybqx/components/dioFun.dart';
|
import 'package:hyzp_ybqx/components/dioFun.dart';
|
||||||
|
import 'package:map_launcher/map_launcher.dart';
|
||||||
|
|
||||||
//import 'package:hyzp_ybqx/widget/player_pro.dart';
|
//import 'package:hyzp_ybqx/widget/player_pro.dart';
|
||||||
import '../../../components/commonFun.dart';
|
import '../../../components/commonFun.dart';
|
||||||
|
import '../../../services/Storage.dart';
|
||||||
|
import 'maps_sheet.dart';
|
||||||
|
|
||||||
//确认对话框
|
//确认对话框
|
||||||
class dwInfoDialog extends Dialog {
|
class dwInfoDialog extends Dialog {
|
||||||
dwInfoDialog({@required this.id, this.title = "", @required this.dwIndex, this.content});
|
dwInfoDialog({
|
||||||
|
@required this.id,
|
||||||
|
this.title = "",
|
||||||
|
@required this.dwIndex,
|
||||||
|
this.content,
|
||||||
|
// 导航相关参数
|
||||||
|
this.parentContext,
|
||||||
|
this.destinationLatitude,
|
||||||
|
this.destinationLongitude,
|
||||||
|
this.destinationTitle,
|
||||||
|
this.availableMaps,
|
||||||
|
});
|
||||||
|
|
||||||
int dwIndex;
|
int dwIndex;
|
||||||
String id;
|
String id;
|
||||||
String title;
|
String title;
|
||||||
String content;
|
String content;
|
||||||
bool ret = false;
|
bool ret = false;
|
||||||
|
BuildContext parentContext;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
getDefaultMap();
|
||||||
Size mediaSize = MediaQuery.of(context).size;
|
Size mediaSize = MediaQuery.of(context).size;
|
||||||
return WillPopScope(
|
return WillPopScope(
|
||||||
child: Material(
|
child: Material(
|
||||||
@@ -90,9 +106,9 @@ class dwInfoDialog extends Dialog {
|
|||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
ret = true;
|
ret = true;
|
||||||
getingDwVideo = false;
|
getingDwVideo = false;
|
||||||
Navigator.pop(context, ret); //关闭弹框,返回sRet
|
navigationMap(context);
|
||||||
},
|
},
|
||||||
child: Text("确认"),
|
child: Text("导航"),
|
||||||
),
|
),
|
||||||
RaisedButton(
|
RaisedButton(
|
||||||
child: Text("取消"),
|
child: Text("取消"),
|
||||||
@@ -115,4 +131,94 @@ class dwInfoDialog extends Dialog {
|
|||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 导航相关代码
|
||||||
|
double destinationLatitude = 28.45382237207785;
|
||||||
|
double destinationLongitude = 104.7506958256658;
|
||||||
|
String destinationTitle = '珙县大坪上';
|
||||||
|
|
||||||
|
double originLatitude;
|
||||||
|
double originLongitude;
|
||||||
|
String originTitle = '我的位置';
|
||||||
|
|
||||||
|
List<Coords> waypoints = [
|
||||||
|
// Coords(37.7705112, -122.4108267),
|
||||||
|
// Coords(37.6988984, -122.4830961),
|
||||||
|
// Coords(37.7935754, -122.483654),
|
||||||
|
];
|
||||||
|
|
||||||
|
DirectionsMode directionsMode = DirectionsMode.driving;
|
||||||
|
|
||||||
|
List<AvailableMap> availableMaps;
|
||||||
|
|
||||||
|
// String defaultMapName = 'Amap';
|
||||||
|
String defaultMapName = g_defaultMapName;
|
||||||
|
AvailableMap defalutMap;
|
||||||
|
|
||||||
|
void getDefaultMap() async {
|
||||||
|
print('getCurrentPosition begin');
|
||||||
|
|
||||||
|
// 是否保存默认地图
|
||||||
|
g_bSaveDefaultMap = await Storage.getBool('bSaveDefaultMap');
|
||||||
|
g_bSaveDefaultMap = (null == g_bSaveDefaultMap) ? false : g_bSaveDefaultMap; // 默认不保存
|
||||||
|
// 用户选择的默认地图名称
|
||||||
|
g_defaultMapName = await Storage.getString('defaultMapName');
|
||||||
|
g_defaultMapName = (null == g_defaultMapName) ? '' : g_defaultMapName; // 默认为空字符串
|
||||||
|
defaultMapName = g_defaultMapName;
|
||||||
|
|
||||||
|
// 获取用户选择的默认地图
|
||||||
|
// availableMaps = await MapLauncher.installedMaps; // 为避免延迟错乱,该变量由父组件传入
|
||||||
|
if (defaultMapName != null && defaultMapName.length > 0) {
|
||||||
|
for (var map in availableMaps) {
|
||||||
|
if (defaultMapName.toLowerCase() == map.mapName.toLowerCase()) {
|
||||||
|
defalutMap = map;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
navigationMap(BuildContext context) {
|
||||||
|
print('this.defalutMap = ${defalutMap}');
|
||||||
|
if (defalutMap != null) {
|
||||||
|
defalutMap.showDirections(
|
||||||
|
destination: Coords(
|
||||||
|
destinationLatitude,
|
||||||
|
destinationLongitude,
|
||||||
|
),
|
||||||
|
destinationTitle: destinationTitle,
|
||||||
|
origin: originLatitude == null || originLongitude == null
|
||||||
|
? null
|
||||||
|
: Coords(originLatitude, originLongitude),
|
||||||
|
originTitle: originTitle,
|
||||||
|
waypoints: waypoints,
|
||||||
|
directionsMode: directionsMode,
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
MapsSheet.show(
|
||||||
|
context: parentContext,
|
||||||
|
onMapTap: (map) {
|
||||||
|
if (g_bSaveDefaultMap) {
|
||||||
|
g_defaultMapName = map.mapName;
|
||||||
|
Storage.setString('defaultMapName', g_defaultMapName);
|
||||||
|
}
|
||||||
|
|
||||||
|
map.showDirections(
|
||||||
|
destination: Coords(
|
||||||
|
destinationLatitude,
|
||||||
|
destinationLongitude,
|
||||||
|
),
|
||||||
|
destinationTitle: destinationTitle,
|
||||||
|
origin: originLatitude == null || originLongitude == null
|
||||||
|
? null
|
||||||
|
: Coords(originLatitude, originLongitude),
|
||||||
|
originTitle: originTitle,
|
||||||
|
waypoints: waypoints,
|
||||||
|
directionsMode: directionsMode,
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
Navigator.pop(context, ret); //关闭弹框,返回sRet
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,62 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_svg/flutter_svg.dart';
|
||||||
|
import 'package:map_launcher/map_launcher.dart';
|
||||||
|
|
||||||
|
class MapsSheet {
|
||||||
|
static show({
|
||||||
|
@required BuildContext context,
|
||||||
|
@required Function(AvailableMap map) onMapTap,
|
||||||
|
}) async {
|
||||||
|
final availableMaps = await MapLauncher.installedMaps;
|
||||||
|
|
||||||
|
showModalBottomSheet(
|
||||||
|
context: context,
|
||||||
|
builder: (BuildContext context) {
|
||||||
|
return SafeArea(
|
||||||
|
child: Column(
|
||||||
|
children: <Widget>[
|
||||||
|
Expanded(
|
||||||
|
child: SingleChildScrollView(
|
||||||
|
child: Container(
|
||||||
|
child: Wrap(
|
||||||
|
children: <Widget>[
|
||||||
|
for (var map in availableMaps)
|
||||||
|
ListTile(
|
||||||
|
onTap: () {
|
||||||
|
print('map.mapName = ${map.mapName}');
|
||||||
|
// map.mapName = Amap
|
||||||
|
Navigator.pop(context);
|
||||||
|
onMapTap(map);
|
||||||
|
},
|
||||||
|
title: () {
|
||||||
|
var mapName = "";
|
||||||
|
switch (map.mapType) {
|
||||||
|
case MapType.amap:
|
||||||
|
mapName = "高德地图";
|
||||||
|
break;
|
||||||
|
case MapType.baidu:
|
||||||
|
mapName = "百度地图";
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
mapName = map.mapName;
|
||||||
|
}
|
||||||
|
return Text(mapName);
|
||||||
|
}(),
|
||||||
|
leading: SvgPicture.asset(
|
||||||
|
map.icon,
|
||||||
|
height: 30.0,
|
||||||
|
width: 30.0,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -13,6 +13,7 @@ import 'package:keyboard_avoider/keyboard_avoider.dart';
|
|||||||
|
|
||||||
//
|
//
|
||||||
import '../../../components/commonFun.dart';
|
import '../../../components/commonFun.dart';
|
||||||
|
|
||||||
//import 'package:hyzp_ybqx/widget/player_pro_new.dart';
|
//import 'package:hyzp_ybqx/widget/player_pro_new.dart';
|
||||||
import '../../../components/dioFun.dart';
|
import '../../../components/dioFun.dart';
|
||||||
import '../../../components/doJSON.dart';
|
import '../../../components/doJSON.dart';
|
||||||
@@ -75,6 +76,8 @@ class _LoginPageState extends State<TsjjContentNew> with SingleTickerProviderSta
|
|||||||
try_setState(); //避免如下异常报错
|
try_setState(); //避免如下异常报错
|
||||||
});
|
});
|
||||||
|
|
||||||
|
print('official_seal = $official_seal');
|
||||||
|
|
||||||
_widthLeft = _screenWidth / 2;
|
_widthLeft = _screenWidth / 2;
|
||||||
getListFlields();
|
getListFlields();
|
||||||
|
|
||||||
@@ -123,7 +126,8 @@ class _LoginPageState extends State<TsjjContentNew> with SingleTickerProviderSta
|
|||||||
print('_mapTsjjGetTsStatus = $_mapTsjjGetTsStatus');
|
print('_mapTsjjGetTsStatus = $_mapTsjjGetTsStatus');
|
||||||
|
|
||||||
// 获取网络图片尺寸,getMediaUrl(_mapGetTsjjGetData['pic_url'])
|
// 获取网络图片尺寸,getMediaUrl(_mapGetTsjjGetData['pic_url'])
|
||||||
await flustars.WidgetUtil.getImageWH(url: getMediaUrl(_mapGetTsjjGetData['pic_url'])).then((rect) {
|
await flustars.WidgetUtil.getImageWH(url: getMediaUrl(_mapGetTsjjGetData['pic_url']))
|
||||||
|
.then((rect) {
|
||||||
if (null != rect) {
|
if (null != rect) {
|
||||||
_radioImage = rect.height / rect.width;
|
_radioImage = rect.height / rect.width;
|
||||||
print("rect = $rect,_radioImage = $_radioImage");
|
print("rect = $rect,_radioImage = $_radioImage");
|
||||||
@@ -915,8 +919,13 @@ class _LoginPageState extends State<TsjjContentNew> with SingleTickerProviderSta
|
|||||||
//color: Colors.black12,
|
//color: Colors.black12,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
//color: Colors.white,
|
//color: Colors.white,
|
||||||
|
// image: DecorationImage(
|
||||||
|
// image: AssetImage("assets/images/jkzx_stamp.png"), fit: BoxFit.contain),
|
||||||
|
// image: DecorationImage(
|
||||||
|
// image: AssetImage("assets/images/宜宾市长宁生态环境局.png"), fit: BoxFit.contain),
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
image: AssetImage("assets/images/jkzx_stamp.png"), fit: BoxFit.contain),
|
image: AssetImage("assets/images/" + official_seal), fit: BoxFit.contain),
|
||||||
|
|
||||||
),
|
),
|
||||||
//child:
|
//child:
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ import 'package:hyzp_ybqx/pages/Works/TJXX/tj_data.dart';
|
|||||||
import 'package:hyzp_ybqx/pages/tabs/page5_userManager.dart';
|
import 'package:hyzp_ybqx/pages/tabs/page5_userManager.dart';
|
||||||
import 'package:hyzp_ybqx/pages/tabs/page6_download.dart';
|
import 'package:hyzp_ybqx/pages/tabs/page6_download.dart';
|
||||||
import 'package:hyzp_ybqx/pages/tabs/page7_setRemind.dart';
|
import 'package:hyzp_ybqx/pages/tabs/page7_setRemind.dart';
|
||||||
|
import 'package:hyzp_ybqx/pages/tabs/page8_defaultMap.dart';
|
||||||
import 'package:hyzp_ybqx/services/EventBus.dart';
|
import 'package:hyzp_ybqx/services/EventBus.dart';
|
||||||
import 'package:hyzp_ybqx/widget/JdButton.dart';
|
import 'package:hyzp_ybqx/widget/JdButton.dart';
|
||||||
import 'package:package_info/package_info.dart';
|
import 'package:package_info/package_info.dart';
|
||||||
@@ -111,35 +112,35 @@ class _Page4_MyMsicsNewState extends State<Page4_MyMsicsNew>
|
|||||||
static onNullFun() {}
|
static onNullFun() {}
|
||||||
|
|
||||||
Widget _getListTile(
|
Widget _getListTile(
|
||||||
title, {
|
title, {
|
||||||
String leadPath = '',
|
String leadPath = '',
|
||||||
Color leadColor,
|
Color leadColor,
|
||||||
Color textColor,
|
Color textColor,
|
||||||
onTapFun = onNullFun,
|
onTapFun = onNullFun,
|
||||||
onLongPressFun = onNullFun,
|
onLongPressFun = onNullFun,
|
||||||
size = 16.0,
|
size = 16.0,
|
||||||
bool bBadge = false,
|
bool bBadge = false,
|
||||||
Widget trailWidget = const Icon(Icons.arrow_forward_ios),
|
Widget trailWidget = const Icon(Icons.arrow_forward_ios),
|
||||||
}) {
|
}) {
|
||||||
// print("_getListTile bVoiceRemind = $bVoiceRemind"); // _getListTile bVoiceRemind = false
|
// print("_getListTile bVoiceRemind = $bVoiceRemind"); // _getListTile bVoiceRemind = false
|
||||||
return Column(
|
return Column(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
ListTile(
|
ListTile(
|
||||||
leading: bBadge
|
leading: bBadge
|
||||||
? Badge(
|
? Badge(
|
||||||
position: BadgePosition.topEnd(top: -7, end: -12),
|
position: BadgePosition.topEnd(top: -7, end: -12),
|
||||||
badgeContent: null,
|
badgeContent: null,
|
||||||
child: Image.asset(
|
child: Image.asset(
|
||||||
leadPath,
|
leadPath,
|
||||||
height: ScreenUtil().setHeight(78),
|
height: ScreenUtil().setHeight(78),
|
||||||
fit: BoxFit.fitHeight,
|
fit: BoxFit.fitHeight,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
: Image.asset(
|
: Image.asset(
|
||||||
leadPath,
|
leadPath,
|
||||||
height: ScreenUtil().setHeight(78),
|
height: ScreenUtil().setHeight(78),
|
||||||
fit: BoxFit.fitHeight,
|
fit: BoxFit.fitHeight,
|
||||||
),
|
),
|
||||||
title: Text(title, style: TextStyle(fontSize: size, color: textColor)),
|
title: Text(title, style: TextStyle(fontSize: size, color: textColor)),
|
||||||
trailing: trailWidget,
|
trailing: trailWidget,
|
||||||
contentPadding: EdgeInsets.symmetric(horizontal: 20.0, vertical: 0),
|
contentPadding: EdgeInsets.symmetric(horizontal: 20.0, vertical: 0),
|
||||||
@@ -202,11 +203,13 @@ class _Page4_MyMsicsNewState extends State<Page4_MyMsicsNew>
|
|||||||
leadPath: 'assets/images/账户管理.png',
|
leadPath: 'assets/images/账户管理.png',
|
||||||
leadColor: _deepBlueColor,
|
leadColor: _deepBlueColor,
|
||||||
onTapFun: OnTap_user_manager),
|
onTapFun: OnTap_user_manager),
|
||||||
|
_getListTile('默认导航',
|
||||||
|
leadPath: 'assets/images/默认地图3.png',
|
||||||
|
leadColor: _deepBlueColor,
|
||||||
|
onTapFun: OnTap_DefaultMap),
|
||||||
//bNewVer:是否发现新版本
|
//bNewVer:是否发现新版本
|
||||||
_getListTile('提醒设置',
|
_getListTile('提醒设置',
|
||||||
leadPath: 'assets/images/语音提醒.png',
|
leadPath: 'assets/images/语音提醒.png', leadColor: _deepGreyColor, onTapFun: OnTap_Remind),
|
||||||
leadColor: _deepGreyColor,
|
|
||||||
onTapFun: OnTap_Remind),
|
|
||||||
_getListTile('关于',
|
_getListTile('关于',
|
||||||
leadPath: 'assets/images/关于.png', leadColor: _deepBlueColor, onTapFun: OnTap_MyAbout)
|
leadPath: 'assets/images/关于.png', leadColor: _deepBlueColor, onTapFun: OnTap_MyAbout)
|
||||||
|
|
||||||
@@ -511,6 +514,10 @@ class _Page4_MyMsicsNewState extends State<Page4_MyMsicsNew>
|
|||||||
Navigator.of(context).push(MaterialPageRoute(builder: (context) => page5_userManager()));
|
Navigator.of(context).push(MaterialPageRoute(builder: (context) => page5_userManager()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
OnTap_DefaultMap() async {
|
||||||
|
Navigator.of(context).push(MaterialPageRoute(builder: (context) => page8_defaultMap()));
|
||||||
|
}
|
||||||
|
|
||||||
OnTap_download() {
|
OnTap_download() {
|
||||||
Navigator.of(context).push(MaterialPageRoute(builder: (context) => page6_download()));
|
Navigator.of(context).push(MaterialPageRoute(builder: (context) => page6_download()));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,284 @@
|
|||||||
|
import 'package:badges/badges.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
|
import 'package:hyzp_ybqx/pages/Login/FaceReg.dart';
|
||||||
|
import 'package:hyzp_ybqx/pages/Login/ModifyPassword.dart';
|
||||||
|
import 'package:hyzp_ybqx/services/Storage.dart';
|
||||||
|
|
||||||
|
import '../../components/commonFun.dart';
|
||||||
|
import '../../widget/JdButton.dart';
|
||||||
|
|
||||||
|
class page8_defaultMap extends StatefulWidget {
|
||||||
|
page8_defaultMap({Key key}) : super(key: key);
|
||||||
|
|
||||||
|
_LoginPageState createState() => _LoginPageState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _LoginPageState extends State<page8_defaultMap> {
|
||||||
|
bool bSaveDefaultMap = false;
|
||||||
|
String defaultMapName = '';
|
||||||
|
|
||||||
|
dispose() {
|
||||||
|
super.dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
super.initState();
|
||||||
|
init();
|
||||||
|
}
|
||||||
|
|
||||||
|
void init() async {
|
||||||
|
// 从磁盘读取变量
|
||||||
|
// 是否保存默认地图
|
||||||
|
g_bSaveDefaultMap = await Storage.getBool('bSaveDefaultMap');
|
||||||
|
g_bSaveDefaultMap = (null == g_bSaveDefaultMap) ? false : g_bSaveDefaultMap; // 默认不保存
|
||||||
|
// 用户选择的默认地图名称
|
||||||
|
g_defaultMapName = await Storage.getString('defaultMapName');
|
||||||
|
g_defaultMapName = (null == g_defaultMapName) ? '' : g_defaultMapName; // 默认为空字符串
|
||||||
|
|
||||||
|
bSaveDefaultMap = g_bSaveDefaultMap;
|
||||||
|
// bSaveDefaultMap = false;
|
||||||
|
// defaultMapName = g_defaultMapName;
|
||||||
|
// defaultMapName = '高德地图';
|
||||||
|
// defaultMapName = getMapChsName('amap');
|
||||||
|
defaultMapName = getMapChsName(g_defaultMapName);
|
||||||
|
setState(() {});
|
||||||
|
}
|
||||||
|
|
||||||
|
////////
|
||||||
|
static onNullFun() {}
|
||||||
|
|
||||||
|
Widget _getListTile(
|
||||||
|
title, {
|
||||||
|
String leadPath = '',
|
||||||
|
Color leadColor,
|
||||||
|
Color textColor,
|
||||||
|
onTapFun = onNullFun,
|
||||||
|
onLongPressFun = onNullFun,
|
||||||
|
size = 16.0,
|
||||||
|
bool bBadge = false,
|
||||||
|
Widget trailWidget = const Icon(Icons.arrow_forward_ios),
|
||||||
|
}) {
|
||||||
|
// print("_getListTile bSaveDefaultMap = $bSaveDefaultMap "); // _getListTile bSaveDefaultMap = false
|
||||||
|
return Column(
|
||||||
|
children: <Widget>[
|
||||||
|
ListTile(
|
||||||
|
leading: bBadge
|
||||||
|
? Badge(
|
||||||
|
position: BadgePosition.topEnd(top: -7, end: -12),
|
||||||
|
badgeContent: null,
|
||||||
|
child: Image.asset(
|
||||||
|
leadPath,
|
||||||
|
height: ScreenUtil().setHeight(78),
|
||||||
|
fit: BoxFit.fitHeight,
|
||||||
|
// color: leadColor, // 无效
|
||||||
|
),
|
||||||
|
)
|
||||||
|
: Image.asset(
|
||||||
|
leadPath,
|
||||||
|
height: ScreenUtil().setHeight(78),
|
||||||
|
fit: BoxFit.fitHeight,
|
||||||
|
),
|
||||||
|
title: Text(title, style: TextStyle(fontSize: size, color: textColor)),
|
||||||
|
trailing: trailWidget,
|
||||||
|
contentPadding: EdgeInsets.symmetric(horizontal: 20.0, vertical: 0),
|
||||||
|
enabled: true,
|
||||||
|
onTap: onTapFun,
|
||||||
|
onLongPress: onLongPressFun,
|
||||||
|
),
|
||||||
|
Divider(
|
||||||
|
height: 1.0,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
List<Widget> _listViewUser = [];
|
||||||
|
|
||||||
|
Color _greenColor = Color.fromRGBO(36, 206, 192, 1); //绿色
|
||||||
|
Color _deepBlueColor = Color.fromRGBO(79, 118, 230, 1); //深蓝
|
||||||
|
Color _deepGreyColor = Color.fromRGBO(116, 139, 161, 1); //深灰
|
||||||
|
Color _ligthBlueColor = Color.fromRGBO(80, 159, 245, 1); //亮蓝
|
||||||
|
|
||||||
|
OnTap_FaceReg() async {
|
||||||
|
Navigator.of(context).push(MaterialPageRoute(builder: (context) => FaceReg()));
|
||||||
|
}
|
||||||
|
|
||||||
|
OnTap_modify_password() {
|
||||||
|
Navigator.of(context).push(MaterialPageRoute(builder: (context) => ModifyPassword()));
|
||||||
|
}
|
||||||
|
|
||||||
|
OnTap_Remind() {
|
||||||
|
setState(() {
|
||||||
|
bSaveDefaultMap = !bSaveDefaultMap;
|
||||||
|
print("bSaveDefaultMap = $bSaveDefaultMap");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget getTextField() {
|
||||||
|
return Container(
|
||||||
|
width: ScreenUtil().setWidth(400),
|
||||||
|
child: TextField(
|
||||||
|
readOnly: !bSaveDefaultMap,
|
||||||
|
focusNode: FocusNode(),
|
||||||
|
textAlignVertical: TextAlignVertical(y: 1.0),
|
||||||
|
controller: TextEditingController.fromValue(TextEditingValue(
|
||||||
|
text: defaultMapName.toString(),
|
||||||
|
// 保持光标在最后
|
||||||
|
selection: TextSelection.fromPosition(TextPosition(
|
||||||
|
affinity: TextAffinity.downstream, offset: defaultMapName.toString().length)))),
|
||||||
|
maxLines: 1,
|
||||||
|
keyboardType: TextInputType.text,
|
||||||
|
decoration: InputDecoration(
|
||||||
|
//contentPadding: EdgeInsets.only(bottom: 16),
|
||||||
|
// hintText: widget.text,
|
||||||
|
// border: OutlineInputBorder(
|
||||||
|
// borderRadius: BorderRadius.circular(30), borderSide: BorderSide.none),
|
||||||
|
border: UnderlineInputBorder(borderSide: BorderSide(color: Colors.lightBlue)),
|
||||||
|
focusedBorder: UnderlineInputBorder(borderSide: BorderSide(color: Colors.lightBlue)),
|
||||||
|
enabledBorder: UnderlineInputBorder(borderSide: BorderSide(color: Colors.lightBlue)),
|
||||||
|
),
|
||||||
|
onChanged: (v) {
|
||||||
|
defaultMapName = v;
|
||||||
|
},
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget getText(String text) {
|
||||||
|
return Container(
|
||||||
|
child: Text(text,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 16,
|
||||||
|
color: Colors.blueAccent,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
decoration: TextDecoration.underline,
|
||||||
|
)),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
////////
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Scaffold(
|
||||||
|
appBar: PreferredSize(
|
||||||
|
preferredSize: Size.fromHeight(ScreenUtil().setHeight(173)), // 设置appBar高度
|
||||||
|
// 设置appBar高度
|
||||||
|
child: AppBar(
|
||||||
|
automaticallyImplyLeading: false,
|
||||||
|
centerTitle: true,
|
||||||
|
titleSpacing: 0.0,
|
||||||
|
//设置title的左边距
|
||||||
|
flexibleSpace: Container(
|
||||||
|
//SizedBox(height: ScreenUtil().statusBarHeight), //显示顶部状态栏
|
||||||
|
// SizedBox(height: ScreenUtil().setHeight(10)), //显示顶部状态栏
|
||||||
|
padding: EdgeInsets.only(top: ScreenUtil().statusBarHeight), //留出顶部状态栏高度
|
||||||
|
child: Container(
|
||||||
|
//height: ScreenUtil().setHeight(173),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
gradient: LinearGradient(
|
||||||
|
begin: Alignment.centerLeft,
|
||||||
|
end: Alignment.centerRight,
|
||||||
|
colors: [
|
||||||
|
Color.fromRGBO(12, 186, 156, 1),
|
||||||
|
Color.fromRGBO(39, 127, 235, 1),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
// decoration: BoxDecoration(
|
||||||
|
// gradient: LinearGradient(colors: [
|
||||||
|
// Color(0xFF0018EB),
|
||||||
|
// Color(0xFF01C1D9),
|
||||||
|
// ], begin: Alignment.bottomCenter, end: Alignment.topCenter),
|
||||||
|
// ),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
title: Padding(
|
||||||
|
padding: EdgeInsets.only(left: 0, right: 0),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
getIconAndTextButton(
|
||||||
|
iconColor: Colors.white,
|
||||||
|
iconData: Icons.chevron_left_outlined,
|
||||||
|
onPress: () {
|
||||||
|
Navigator.pop(context);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: Text("默认导航设置",
|
||||||
|
style: TextStyle(color: Colors.white, fontSize: 20),
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
overflow: TextOverflow.ellipsis),
|
||||||
|
),
|
||||||
|
SizedBox(width: 50),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
body: Container(
|
||||||
|
padding: EdgeInsets.only(top: 30, bottom: 20, left: 20, right: 20),
|
||||||
|
child: ListView(
|
||||||
|
children: [
|
||||||
|
Center(
|
||||||
|
child: Container(
|
||||||
|
margin: EdgeInsets.only(top: 30),
|
||||||
|
height: ScreenUtil().setWidth(160),
|
||||||
|
width: ScreenUtil().setWidth(160),
|
||||||
|
//child: Image.asset('assets/images/user.png', fit: BoxFit.cover),
|
||||||
|
child: Image.asset('assets/images/ybsthbj.png', fit: BoxFit.fitHeight),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(height: 50),
|
||||||
|
_getListTile('保存默认导航地图',
|
||||||
|
leadPath: 'assets/images/地图选中.png',
|
||||||
|
leadColor: _deepGreyColor,
|
||||||
|
// textColor: bSaveDefaultMap ? Colors.blue : null,
|
||||||
|
onTapFun: OnTap_Remind,
|
||||||
|
trailWidget: bSaveDefaultMap
|
||||||
|
? Icon(Icons.check_box, color: Colors.blue)
|
||||||
|
: Icon(Icons.check_box_outline_blank, color: Colors.blueAccent)),
|
||||||
|
_getListTile('已选默认导航地图:',
|
||||||
|
leadPath: 'assets/images/用户选择.png',
|
||||||
|
leadColor: _deepBlueColor,
|
||||||
|
trailWidget: getText(defaultMapName)),
|
||||||
|
SizedBox(height: 60),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||||
|
children: [
|
||||||
|
JdButton(
|
||||||
|
height: 128,
|
||||||
|
width: 282,
|
||||||
|
//height: 126,
|
||||||
|
text: "确认",
|
||||||
|
color: Colors.blueAccent,
|
||||||
|
onTop: () async {
|
||||||
|
g_bSaveDefaultMap = bSaveDefaultMap;
|
||||||
|
await Storage.setBool('bSaveDefaultMap', g_bSaveDefaultMap);
|
||||||
|
if (!g_bSaveDefaultMap) {
|
||||||
|
await Storage.setString('defaultMapName', '');
|
||||||
|
}
|
||||||
|
Navigator.pop(context);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
JdButton(
|
||||||
|
height: 128,
|
||||||
|
width: 282,
|
||||||
|
//height: 126,
|
||||||
|
text: "取消",
|
||||||
|
color: Colors.blueAccent,
|
||||||
|
onTop: () {
|
||||||
|
Navigator.pop(context);
|
||||||
|
},
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,739 @@
|
|||||||
|
import 'dart:async';
|
||||||
|
import 'dart:convert';
|
||||||
|
import 'dart:ui';
|
||||||
|
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter/services.dart';
|
||||||
|
import 'package:flutter_screenutil/screen_util.dart';
|
||||||
|
import 'package:flutter_superplayer/flutter_superplayer.dart';
|
||||||
|
import 'package:flutterptcontrol/flutterptcontrol.dart';
|
||||||
|
import 'package:hyzp_ybqx/components/commonFun.dart';
|
||||||
|
import 'package:hyzp_ybqx/components/dioFun.dart';
|
||||||
|
import 'package:hyzp_ybqx/provider/player_ratio.dart';
|
||||||
|
import 'package:hyzp_ybqx/provider/player_region.dart';
|
||||||
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
|
import '../components/commonFun.dart';
|
||||||
|
import '../services/Storage.dart';
|
||||||
|
|
||||||
|
const _kControlViewTypes = [kControlViewTypeDefault, kControlViewTypeWithout];
|
||||||
|
|
||||||
|
class SuperPlayerPage extends StatefulWidget {
|
||||||
|
SuperPlayerPage(
|
||||||
|
{@required this.url,
|
||||||
|
this.id = -2, // 播放点位视频的点位编号,-2 表示播放违章视频
|
||||||
|
this.dwip = '', // 点位IP,用于点位视频控制球机方向
|
||||||
|
this.loop = 1,
|
||||||
|
this.title = 'Tencent Player',
|
||||||
|
Key key})
|
||||||
|
: super(key: key);
|
||||||
|
String dwip;
|
||||||
|
String url;
|
||||||
|
String title;
|
||||||
|
int loop; //设置播放循环,默认播放器的循环次数是1, 即不循环播放。如果设置循环次数0,表示无限循环。
|
||||||
|
int id;
|
||||||
|
|
||||||
|
@override
|
||||||
|
_SuperPlayerPageState createState() => _SuperPlayerPageState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _SuperPlayerPageState extends State<SuperPlayerPage> with SuperPlayerListener {
|
||||||
|
SuperPlayerController _playerController = SuperPlayerController();
|
||||||
|
|
||||||
|
String _sdkVersion = 'Unknown';
|
||||||
|
List<String> _logs = [];
|
||||||
|
bool bFullScreen = false;
|
||||||
|
|
||||||
|
String _controlViewType = _kControlViewTypes.first;
|
||||||
|
|
||||||
|
@override
|
||||||
|
void dispose() {
|
||||||
|
Playing = false;
|
||||||
|
// 云台控制代码:1:停止动作、3:启动雨刷、11:焦距变大、12:焦距变小
|
||||||
|
setSphericalCameraDio(id: widget.id, dwip: widget.dwip, cmdCode: 1);
|
||||||
|
super.dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
super.initState();
|
||||||
|
//initPlatformState();
|
||||||
|
// Future.delayed(const Duration(milliseconds: 1000), () {
|
||||||
|
// _playerController.playWithModel(SuperPlayerModel(url: widget.url));
|
||||||
|
// setState(() {
|
||||||
|
// });
|
||||||
|
// });
|
||||||
|
init();
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> init() async {
|
||||||
|
await _playerController.addListener(this);
|
||||||
|
await initPlatformState();
|
||||||
|
if (!mounted) return;
|
||||||
|
print('mounted = ${mounted}');
|
||||||
|
// 开启调试日志
|
||||||
|
//await FTXPlayerController.setConsoleEnabled(true);
|
||||||
|
// 初始化播放器
|
||||||
|
//await _controller.initialize(onlyAudio: true);
|
||||||
|
|
||||||
|
await _playerController.uiHideDanmu(); // 隐藏弹幕
|
||||||
|
//设置播放循环,默认播放器的循环次数是1, 即不循环播放。如果设置循环次数0,表示无限循环。
|
||||||
|
if (0 == widget.loop) {
|
||||||
|
await _playerController.setLoop(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
await _playerController.playWithModel(testSuperPlayerModel);
|
||||||
|
//_controller.play("http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4");
|
||||||
|
// _controller
|
||||||
|
// .play('rtmp://125.64.218.67:9901/rtp/gb_play_34020000001320003016_34020000001320003016');
|
||||||
|
// 设置循环播放
|
||||||
|
//await _controller.setLoop(true);
|
||||||
|
// 开始播放
|
||||||
|
//await _controller.play("http://125.64.218.67:9908/video/2_6063_20210409_140608_川Q31715.mp4");
|
||||||
|
}
|
||||||
|
|
||||||
|
SuperPlayerModel get testSuperPlayerModel {
|
||||||
|
// int appId = 1252463788;
|
||||||
|
// String fileId = "5285890781763144364";
|
||||||
|
|
||||||
|
SuperPlayerModel superPlayerModel = SuperPlayerModel(
|
||||||
|
url: widget.url,
|
||||||
|
// appId: appId,
|
||||||
|
// videoId: SuperPlayerVideoId(fileId: fileId),
|
||||||
|
);
|
||||||
|
return superPlayerModel;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Platform messages are asynchronous, so we initialize in an async method.
|
||||||
|
Future<void> initPlatformState() async {
|
||||||
|
String sdkVersion;
|
||||||
|
// Platform messages may fail, so we use a try/catch PlatformException.
|
||||||
|
try {
|
||||||
|
sdkVersion = await FlutterSuperPlayer.sdkVersion;
|
||||||
|
} on PlatformException {
|
||||||
|
sdkVersion = 'Failed to get platform version.';
|
||||||
|
}
|
||||||
|
print('sdkVersion = ${sdkVersion}');
|
||||||
|
print('mounted = ${mounted}');
|
||||||
|
|
||||||
|
// If the widget was removed from the tree while the asynchronous platform
|
||||||
|
// message was in flight, we want to discard the reply rather than calling
|
||||||
|
// setState to update our non-existent appearance.
|
||||||
|
if (!mounted) return;
|
||||||
|
|
||||||
|
setState(() {
|
||||||
|
_sdkVersion = sdkVersion;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void _addLog(String method, dynamic data) {
|
||||||
|
_logs.add('>>>$method');
|
||||||
|
if (data != null) {
|
||||||
|
_logs.add(data is Map ? json.encode(data) : data);
|
||||||
|
}
|
||||||
|
_logs.add(' ');
|
||||||
|
|
||||||
|
setState(() {});
|
||||||
|
}
|
||||||
|
|
||||||
|
PlayerRatioProvide playerRatioProvide;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
playerRegionProvide = Provider.of<PlayerRegionProvide>(context);
|
||||||
|
playerRatioProvide = Provider.of<PlayerRatioProvide>(context);
|
||||||
|
// List<Widget> listData = getDataListControl2();
|
||||||
|
double btnHeight1 = 70; //第一按钮行高度
|
||||||
|
double btnHeight2 = 160; //第二按钮行高度
|
||||||
|
int btnCount = 4; //每行按钮个数
|
||||||
|
// int btnCount3 = listData.length; //每行按钮个数
|
||||||
|
var mediaSize = MediaQuery.of(context).size;
|
||||||
|
|
||||||
|
// widget.id:播放点位视频的点位编号,-2 表示播放违章视频
|
||||||
|
double btn_left = -2 == widget.id ? 347 : 70; //第一按钮行高度
|
||||||
|
double btn_gap = -2 == widget.id ? 104 : 70; //第一按钮行高度
|
||||||
|
|
||||||
|
//远程控制球机方向按钮外半径和内半径
|
||||||
|
double _outerRadius = 270;
|
||||||
|
double _innerRadius = _outerRadius / 2;
|
||||||
|
|
||||||
|
//double barHeight = bFullScreen ? 0 : MediaQueryData.fromWindow(window).padding.top;
|
||||||
|
return Scaffold(
|
||||||
|
appBar: bFullScreen
|
||||||
|
? null
|
||||||
|
: PreferredSize(
|
||||||
|
preferredSize: Size.fromHeight(ScreenUtil().setHeight(173)), // 设置appBar高度
|
||||||
|
// 设置appBar高度
|
||||||
|
child: AppBar(
|
||||||
|
automaticallyImplyLeading: false,
|
||||||
|
centerTitle: true,
|
||||||
|
titleSpacing: 0.0,
|
||||||
|
//设置title的左边距
|
||||||
|
flexibleSpace: Container(
|
||||||
|
//SizedBox(height: ScreenUtil().statusBarHeight), //显示顶部状态栏
|
||||||
|
// SizedBox(height: ScreenUtil().setHeight(10)), //显示顶部状态栏
|
||||||
|
padding: EdgeInsets.only(top: ScreenUtil().statusBarHeight), //留出顶部状态栏高度
|
||||||
|
child: Container(
|
||||||
|
//height: ScreenUtil().setHeight(173),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
gradient: LinearGradient(
|
||||||
|
begin: Alignment.centerLeft,
|
||||||
|
end: Alignment.centerRight,
|
||||||
|
colors: [
|
||||||
|
Color.fromRGBO(12, 186, 156, 1),
|
||||||
|
Color.fromRGBO(39, 127, 235, 1),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
// decoration: BoxDecoration(
|
||||||
|
// gradient: LinearGradient(colors: [
|
||||||
|
// Color(0xFF0018EB),
|
||||||
|
// Color(0xFF01C1D9),
|
||||||
|
// ], begin: Alignment.bottomCenter, end: Alignment.topCenter),
|
||||||
|
// ),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
title: Padding(
|
||||||
|
padding: EdgeInsets.only(left: 0, right: 0),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
getIconAndTextButton(
|
||||||
|
iconColor: Colors.white,
|
||||||
|
iconData: Icons.chevron_left_outlined,
|
||||||
|
onPress: () {
|
||||||
|
getingDwVideo = false;
|
||||||
|
Navigator.pop(context);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: Text(widget.title,
|
||||||
|
style: TextStyle(color: Colors.white, fontSize: 18),
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
overflow: TextOverflow.ellipsis),
|
||||||
|
),
|
||||||
|
SizedBox(width: 50),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
body: WillPopScope(
|
||||||
|
child: Container(
|
||||||
|
// height: ScreenUtil().screenHeight -
|
||||||
|
// ScreenUtil().statusBarHeight -
|
||||||
|
// ScreenUtil().bottomBarHeight,
|
||||||
|
color: Color.fromRGBO(224, 224, 224, 1),
|
||||||
|
child: Column(
|
||||||
|
children: <Widget>[
|
||||||
|
//第2行组件,视频播放区
|
||||||
|
Center(
|
||||||
|
child: Container(
|
||||||
|
//padding: EdgeInsets.only(top: barHeight),
|
||||||
|
alignment: Alignment(0, -1),
|
||||||
|
width: MediaQuery.of(context).size.width,
|
||||||
|
height: MediaQuery.of(context).size.width * (9 / 16),
|
||||||
|
color: Colors.black,
|
||||||
|
child: Stack(
|
||||||
|
children: [
|
||||||
|
_playState <= 2 ? getMoreWidget(strokeWidth: 3.0) : SizedBox.shrink(),
|
||||||
|
SuperPlayerView(
|
||||||
|
controller: _playerController,
|
||||||
|
controlViewType: _kControlViewTypes[0],
|
||||||
|
),
|
||||||
|
//_playState < 3 ? SizedBox.shrink() : getMoreWidget(strokeWidth: 3.0),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
//第3.1行组件,控制按钮区
|
||||||
|
bFullScreen ? SizedBox.shrink() : SizedBox(height: ScreenUtil().setHeight(69)),
|
||||||
|
bFullScreen
|
||||||
|
? SizedBox.shrink()
|
||||||
|
: Row(
|
||||||
|
children: [
|
||||||
|
SizedBox(width: ScreenUtil().setWidth(btn_left)),
|
||||||
|
getRoundButton(
|
||||||
|
//(bPlaying) ? '暂停' : '播放',
|
||||||
|
text: playerRegionProvide.playerText,
|
||||||
|
icon: playerRegionProvide.playerIcon,
|
||||||
|
diameter: 130,
|
||||||
|
onPress: playOrPause,
|
||||||
|
),
|
||||||
|
SizedBox(width: ScreenUtil().setWidth(btn_gap)),
|
||||||
|
getRoundButton(
|
||||||
|
text: '刷新',
|
||||||
|
icon: Icons.autorenew,
|
||||||
|
diameter: 130,
|
||||||
|
onPress: () {
|
||||||
|
restartPlay(urlnew);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
// widget.id:播放点位视频的点位编号,-2 表示播放违章视频
|
||||||
|
-2 == widget.id
|
||||||
|
? SizedBox.shrink()
|
||||||
|
: SizedBox(width: ScreenUtil().setWidth(btn_gap)),
|
||||||
|
-2 == widget.id
|
||||||
|
? SizedBox.shrink()
|
||||||
|
: getRoundButton_image(
|
||||||
|
text: '雨刷',
|
||||||
|
image_path: 'assets/images/wiper.png',
|
||||||
|
diameter: 130,
|
||||||
|
onPress: () {
|
||||||
|
// 云台控制代码:1:停止动作、3:启动雨刷、11:焦距变大、12:焦距变小
|
||||||
|
setSphericalCameraDio(
|
||||||
|
id: widget.id, dwip: widget.dwip, cmdCode: 3);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
-2 == widget.id
|
||||||
|
? SizedBox.shrink()
|
||||||
|
: SizedBox(width: ScreenUtil().setWidth(btn_gap)),
|
||||||
|
-2 == widget.id
|
||||||
|
? SizedBox.shrink()
|
||||||
|
: getRoundButton_image(
|
||||||
|
text: '放大',
|
||||||
|
image_path: 'assets/images/zoom_in.png',
|
||||||
|
imageSize: 72,
|
||||||
|
diameter: 130,
|
||||||
|
onPress: () {
|
||||||
|
// 云台控制代码:1:停止动作、3:启动雨刷、11:焦距变大、12:焦距变小
|
||||||
|
setSphericalCameraDio(
|
||||||
|
id: widget.id, dwip: widget.dwip, cmdCode: 11);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
-2 == widget.id
|
||||||
|
? SizedBox.shrink()
|
||||||
|
: SizedBox(width: ScreenUtil().setWidth(btn_gap)),
|
||||||
|
-2 == widget.id
|
||||||
|
? SizedBox.shrink()
|
||||||
|
: getRoundButton_image(
|
||||||
|
text: '缩小',
|
||||||
|
image_path: 'assets/images/zoom_out.png',
|
||||||
|
imageSize: 72,
|
||||||
|
diameter: 130,
|
||||||
|
onPress: () {
|
||||||
|
// 云台控制代码:1:停止动作、3:启动雨刷、11:焦距变大、12:焦距变小
|
||||||
|
setSphericalCameraDio(
|
||||||
|
id: widget.id, dwip: widget.dwip, cmdCode: 12);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
bFullScreen ? SizedBox.shrink() : SizedBox(height: ScreenUtil().setHeight(79)),
|
||||||
|
bFullScreen
|
||||||
|
? SizedBox.shrink()
|
||||||
|
: Container(
|
||||||
|
height: ScreenUtil().setHeight(2 * _outerRadius),
|
||||||
|
width: ScreenUtil().setWidth(2 * _outerRadius),
|
||||||
|
child: PtControlWidget(
|
||||||
|
// innerRadius: _innerRadius,
|
||||||
|
// outerRadius: _outerRadius,
|
||||||
|
// 进行像素单位转换,解决按钮响应错乱问题
|
||||||
|
innerRadius: _innerRadius / ScreenUtil().pixelRatio,
|
||||||
|
outerRadius: _outerRadius / ScreenUtil().pixelRatio,
|
||||||
|
callback: -2 == widget.id // 播放点位视频的点位编号,-2 表示播放违章视频
|
||||||
|
? null
|
||||||
|
: (status) {
|
||||||
|
///点击回调
|
||||||
|
print('status = $status');
|
||||||
|
switch (status) {
|
||||||
|
|
||||||
|
/// status == -1 超出范围
|
||||||
|
/// status == 0 右
|
||||||
|
case 0:
|
||||||
|
setSphericalCameraDio(
|
||||||
|
id: widget.id, dwip: widget.dwip, cmdCode: 24);
|
||||||
|
break;
|
||||||
|
|
||||||
|
/// status == 1 右上
|
||||||
|
case 1:
|
||||||
|
setSphericalCameraDio(
|
||||||
|
id: widget.id, dwip: widget.dwip, cmdCode: 26);
|
||||||
|
break;
|
||||||
|
|
||||||
|
///三、球机位移接口方向代码说明:
|
||||||
|
// 上:8 下:4 左:2 右:1 左上:10 左下:6 右上:9 右下:5
|
||||||
|
|
||||||
|
// 云台控制代码:1:停止动作、3:启动雨刷、11:焦距变大、12:焦距变小
|
||||||
|
// 21:上移
|
||||||
|
// 22:下移
|
||||||
|
// 23:左移
|
||||||
|
// 24:右移
|
||||||
|
// 25:左上移动
|
||||||
|
// 26:右上移动
|
||||||
|
// 27:左下移动
|
||||||
|
// 28:右下移动
|
||||||
|
/// status == 2 上
|
||||||
|
case 2:
|
||||||
|
setSphericalCameraDio(
|
||||||
|
id: widget.id, dwip: widget.dwip, cmdCode: 21);
|
||||||
|
break;
|
||||||
|
|
||||||
|
/// status == 3 左上
|
||||||
|
case 3:
|
||||||
|
setSphericalCameraDio(
|
||||||
|
id: widget.id, dwip: widget.dwip, cmdCode: 25);
|
||||||
|
break;
|
||||||
|
|
||||||
|
/// status == 4 左
|
||||||
|
case 4:
|
||||||
|
setSphericalCameraDio(
|
||||||
|
id: widget.id, dwip: widget.dwip, cmdCode: 23);
|
||||||
|
break;
|
||||||
|
|
||||||
|
/// status == 5 左下
|
||||||
|
case 5:
|
||||||
|
setSphericalCameraDio(
|
||||||
|
id: widget.id, dwip: widget.dwip, cmdCode: 27);
|
||||||
|
break;
|
||||||
|
|
||||||
|
/// status == 6 下
|
||||||
|
case 6:
|
||||||
|
setSphericalCameraDio(
|
||||||
|
id: widget.id, dwip: widget.dwip, cmdCode: 22);
|
||||||
|
break;
|
||||||
|
|
||||||
|
/// status == 7 右下
|
||||||
|
case 7:
|
||||||
|
setSphericalCameraDio(
|
||||||
|
id: widget.id, dwip: widget.dwip, cmdCode: 28);
|
||||||
|
break;
|
||||||
|
|
||||||
|
/// status == 8 还原
|
||||||
|
case 8:
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
),
|
||||||
|
// child: GridView.custom(
|
||||||
|
// // padding: EdgeInsets.only(
|
||||||
|
// // left: ScreenUtil().setWidth(35), right: ScreenUtil().setWidth(35)),
|
||||||
|
// gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||||
|
// crossAxisCount: btnCount3,
|
||||||
|
// mainAxisSpacing: 0,
|
||||||
|
// crossAxisSpacing: 1,
|
||||||
|
// childAspectRatio: ratio3,
|
||||||
|
// ),
|
||||||
|
// childrenDelegate: SliverChildBuilderDelegate((context, position) {
|
||||||
|
// return getItemContainer(listData[position]);
|
||||||
|
// }, childCount: btnCount3)),
|
||||||
|
),
|
||||||
|
//SizedBox(height: ScreenUtil().setHeight(49)),
|
||||||
|
//Divider(color: Colors.blue),
|
||||||
|
//第4行组件,分隔栏
|
||||||
|
// Container(
|
||||||
|
// //height: 11,
|
||||||
|
// height: ScreenUtil().setHeight(28),
|
||||||
|
// color: Color.fromRGBO(224, 224, 224, 1),
|
||||||
|
// ),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
onWillPop: () {
|
||||||
|
Playing = false;
|
||||||
|
getingDwVideo = false;
|
||||||
|
// 云台控制代码:1:停止动作、3:启动雨刷、11:焦距变大、12:焦距变小
|
||||||
|
setSphericalCameraDio(id: widget.id, dwip: widget.dwip, cmdCode: 1);
|
||||||
|
Navigator.pop(context); //关闭弹框,播放输入视频地址
|
||||||
|
},
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void onClickFloatCloseBtn() {
|
||||||
|
_addLog('onClickFloatCloseBtn', {});
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void onClickSmallReturnBtn() {
|
||||||
|
_addLog('onClickSmallReturnBtn', {});
|
||||||
|
Navigator.maybePop(context);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void onFullScreenChange(bool isFullScreen) {
|
||||||
|
_addLog('onFullScreenChange', {'isFullScreen': isFullScreen});
|
||||||
|
bFullScreen = !bFullScreen;
|
||||||
|
setState(() {});
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void onPlayProgressChange(int current, int duration) {
|
||||||
|
_addLog('onPlayProgressChange', {'current': current, 'duration': duration});
|
||||||
|
}
|
||||||
|
|
||||||
|
int _playState = 4;
|
||||||
|
int i = 0;
|
||||||
|
|
||||||
|
@override
|
||||||
|
void onPlayStateChange(int playState) {
|
||||||
|
_playState = playState;
|
||||||
|
i++;
|
||||||
|
print('$i、playState = $playState');
|
||||||
|
_addLog('onPlayStateChange', {'playState': playState});
|
||||||
|
setPlayOrPauseIcon(playState);
|
||||||
|
}
|
||||||
|
|
||||||
|
void setPlayOrPauseIcon(int state) {
|
||||||
|
//state : 1 播放状态,2 暂停状态
|
||||||
|
print('state = $state');
|
||||||
|
if (1 == state) {
|
||||||
|
bPlaying = true;
|
||||||
|
} else {
|
||||||
|
bPlaying = false;
|
||||||
|
}
|
||||||
|
playerRegionProvide.changePlayerState(bPlaying);
|
||||||
|
Storage.setString('bPlaying', bPlaying ? 'true' : 'false');
|
||||||
|
setState(() {});
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void onStartFloatWindowPlay() {
|
||||||
|
_addLog('onStartFloatWindowPlay', {});
|
||||||
|
}
|
||||||
|
|
||||||
|
//生成圆形按钮部件,基于图标
|
||||||
|
Widget getRoundButton(
|
||||||
|
{double diameter = 144,
|
||||||
|
double marginVer = 10,
|
||||||
|
String text,
|
||||||
|
IconData icon,
|
||||||
|
double fontSize = 16,
|
||||||
|
double iconSize = 90,
|
||||||
|
Color color = const Color.fromRGBO(52, 157, 237, 1),
|
||||||
|
var onPress}) {
|
||||||
|
return InkWell(
|
||||||
|
onTap: onPress,
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
width: ScreenUtil().setWidth(diameter),
|
||||||
|
height: ScreenUtil().setHeight(diameter),
|
||||||
|
alignment: Alignment.center,
|
||||||
|
child: Icon(
|
||||||
|
icon,
|
||||||
|
size: ScreenUtil().setWidth(iconSize),
|
||||||
|
color: Color.fromRGBO(52, 157, 237, 1),
|
||||||
|
),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Colors.white,
|
||||||
|
borderRadius: BorderRadius.all(Radius.circular(200)),
|
||||||
|
border: Border.all(width: 0, style: BorderStyle.none),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(height: ScreenUtil().setHeight(marginVer)),
|
||||||
|
Text(text, style: TextStyle(fontSize: fontSize, color: Color.fromRGBO(139, 139, 139, 1))),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
//生成圆形按钮部件,基于图片
|
||||||
|
Widget getRoundButton_image(
|
||||||
|
{double diameter = 144,
|
||||||
|
double marginVer = 10,
|
||||||
|
String text,
|
||||||
|
String image_path,
|
||||||
|
double fontSize = 16,
|
||||||
|
double imageSize = 90,
|
||||||
|
Color color = const Color.fromRGBO(52, 157, 237, 1),
|
||||||
|
Color color_bkg = Colors.white,
|
||||||
|
var onPress}) {
|
||||||
|
return InkWell(
|
||||||
|
onTap: onPress,
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
width: ScreenUtil().setWidth(diameter),
|
||||||
|
height: ScreenUtil().setHeight(diameter),
|
||||||
|
alignment: Alignment.center,
|
||||||
|
child: Image.asset(image_path,
|
||||||
|
fit: BoxFit.fitWidth,
|
||||||
|
width: ScreenUtil().setWidth(imageSize),
|
||||||
|
//height: ScreenUtil().setWidth(iconSize),
|
||||||
|
color: Color.fromRGBO(52, 157, 237, 1)),
|
||||||
|
// child: Icon(
|
||||||
|
// icon,
|
||||||
|
// size: ScreenUtil().setWidth(iconSize),
|
||||||
|
// color: Color.fromRGBO(52, 157, 237, 1),
|
||||||
|
// ),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: color_bkg,
|
||||||
|
borderRadius: BorderRadius.all(Radius.circular(200)),
|
||||||
|
border: Border.all(width: 0, style: BorderStyle.none),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(height: ScreenUtil().setHeight(marginVer)),
|
||||||
|
Text(text, style: TextStyle(fontSize: fontSize, color: Color.fromRGBO(139, 139, 139, 1))),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool bPlaying = true;
|
||||||
|
|
||||||
|
void playOrPause() {
|
||||||
|
//state : 1 播放状态,2 暂停状态
|
||||||
|
_playerController.getPlayState().then((state) {
|
||||||
|
print('state = $state');
|
||||||
|
if (1 == state) {
|
||||||
|
bPlaying = false;
|
||||||
|
_playerController.pause();
|
||||||
|
} else {
|
||||||
|
bPlaying = true;
|
||||||
|
_playerController.resume();
|
||||||
|
}
|
||||||
|
playerRegionProvide.changePlayerState(bPlaying);
|
||||||
|
Storage.setString('bPlaying', bPlaying ? 'true' : 'false');
|
||||||
|
setState(() {});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void restartPlay(String url) async {
|
||||||
|
_playState = 4;
|
||||||
|
bPlaying = true;
|
||||||
|
_playerController.resetPlayer();
|
||||||
|
_playerController.resume();
|
||||||
|
// //writeCurrentPosFile();
|
||||||
|
// await player.stop();
|
||||||
|
// await player.reset();
|
||||||
|
// await player.setOption(FijkOption.playerCategory, "mediacodec-all-videos", 1);
|
||||||
|
// await player.setOption(FijkOption.hostCategory, "enable-snapshot", 1);
|
||||||
|
// await player.setOption(FijkOption.hostCategory, "request-screen-on", 1);
|
||||||
|
// await player.setOption(FijkOption.hostCategory, "request-audio-focus", 1);
|
||||||
|
// await player.setOption(FijkOption.hostCategory, "enable-accurate-seek", 1);
|
||||||
|
// await player.setOption(FijkOption.hostCategory, "max-buffer-size", 500 * 1024);
|
||||||
|
// await player.setDataSource(url, autoPlay: true).catchError((e) {
|
||||||
|
// print("setDataSource error: $e");
|
||||||
|
// });
|
||||||
|
// await player.setLoop(widget.loop); //设置播放循环,默认播放器的循环次数是1, 即不循环播放。如果设置循环次数0,表示无限循环。
|
||||||
|
// bPlaying = true;
|
||||||
|
// setState(() {});
|
||||||
|
// playerRegionProvide.changePlayerState(bPlaying);
|
||||||
|
}
|
||||||
|
|
||||||
|
//生成播放控制区第2行按钮List
|
||||||
|
// List<Widget> getDataListControl2() {
|
||||||
|
// double _diameter = 100;
|
||||||
|
// double _iconSize = 70;
|
||||||
|
// double _fontSize = 14;
|
||||||
|
// double _marginVer = 8;
|
||||||
|
//
|
||||||
|
// List<Widget> list = [
|
||||||
|
// // getRoundButton(
|
||||||
|
// // diameter: _diameter,
|
||||||
|
// // iconSize: _iconSize,
|
||||||
|
// // text: '快退',
|
||||||
|
// // icon: Icons.fast_rewind,
|
||||||
|
// // onPress: () {
|
||||||
|
// // fastSeek(false);
|
||||||
|
// // },
|
||||||
|
// // ),
|
||||||
|
// // getRoundButton(
|
||||||
|
// // diameter: _diameter,
|
||||||
|
// // iconSize: _iconSize,
|
||||||
|
// // text: '快进',
|
||||||
|
// // icon: Icons.fast_forward,
|
||||||
|
// // onPress: () {
|
||||||
|
// // fastSeek(true);
|
||||||
|
// // },
|
||||||
|
// // ),
|
||||||
|
// getRoundButton(
|
||||||
|
// diameter: _diameter,
|
||||||
|
// iconSize: _iconSize,
|
||||||
|
// fontSize: _fontSize,
|
||||||
|
// marginVer: _marginVer,
|
||||||
|
// text: '放大',
|
||||||
|
// icon: Icons.zoom_in,
|
||||||
|
// onPress: () {
|
||||||
|
// //print('Icons.videocam');
|
||||||
|
// //_inputDialog(context2);
|
||||||
|
// if (10 >= playerRatioProvide.scale) {
|
||||||
|
// playerRatioProvide.changeScale(playerRatioProvide.scale + 0.5);
|
||||||
|
// }
|
||||||
|
// },
|
||||||
|
// ),
|
||||||
|
// getRoundButton(
|
||||||
|
// diameter: _diameter,
|
||||||
|
// iconSize: _iconSize,
|
||||||
|
// fontSize: _fontSize,
|
||||||
|
// marginVer: _marginVer,
|
||||||
|
// text: '缩小',
|
||||||
|
// icon: Icons.zoom_out,
|
||||||
|
// onPress: () {
|
||||||
|
// //print('Icons.videocam');
|
||||||
|
// //_getFileDialog(context2);
|
||||||
|
// if (1 < playerRatioProvide.scale) {
|
||||||
|
// playerRatioProvide.changeScale(playerRatioProvide.scale - 0.5);
|
||||||
|
// }
|
||||||
|
// },
|
||||||
|
// ),
|
||||||
|
// // _getIconAndTextButton(
|
||||||
|
// // '还原',
|
||||||
|
// // Icons.reply,
|
||||||
|
// // Colors.orange,
|
||||||
|
// // () {
|
||||||
|
// // //print('Icons.videocam');
|
||||||
|
// // //_getFileDialog(context2);
|
||||||
|
// // // 更新当前位置
|
||||||
|
// // playerRatioProvide.changeScale(1.0);
|
||||||
|
// // playerRatioProvide.changeOffset(Offset(0, 0));
|
||||||
|
// // playerRatioProvide.changeDeltaX(0.0);
|
||||||
|
// // playerRatioProvide.changeDeltaY(0.0);
|
||||||
|
// // },
|
||||||
|
// // ),
|
||||||
|
// getRoundButton(
|
||||||
|
// diameter: _diameter,
|
||||||
|
// iconSize: _iconSize,
|
||||||
|
// fontSize: _fontSize,
|
||||||
|
// marginVer: _marginVer,
|
||||||
|
// text: '截图',
|
||||||
|
// icon: Icons.camera_alt,
|
||||||
|
// onPress: () {
|
||||||
|
// //通过上面定义的key,才能准确调用该类型的该对象的方法
|
||||||
|
// //_myFijkPanelWidgetBuilderStateKey.currentState.takeSnapshot();
|
||||||
|
// //_fijkPanelWidgetBuilder.currentState..takeSnapshot();
|
||||||
|
// takeSnapshot();
|
||||||
|
// },
|
||||||
|
// ),
|
||||||
|
// getRoundButton(
|
||||||
|
// diameter: _diameter,
|
||||||
|
// iconSize: _iconSize,
|
||||||
|
// fontSize: _fontSize,
|
||||||
|
// marginVer: _marginVer,
|
||||||
|
// text: '全屏',
|
||||||
|
// icon: Icons.fullscreen,
|
||||||
|
// onPress: () {
|
||||||
|
// //player.enterFullScreen();
|
||||||
|
// _playerController.toFullScreen();
|
||||||
|
// },
|
||||||
|
// ),
|
||||||
|
// ];
|
||||||
|
// return list;
|
||||||
|
// }
|
||||||
|
|
||||||
|
void takeSnapshot() {
|
||||||
|
// player.takeSnapShot().then((v) {
|
||||||
|
// var provider = MemoryImage(v);
|
||||||
|
// precacheImage(provider, context).then((_) {
|
||||||
|
// setState(() {
|
||||||
|
// myImageProvider = provider;
|
||||||
|
// });
|
||||||
|
// });
|
||||||
|
// FijkLog.d("get snapshot succeed");
|
||||||
|
//
|
||||||
|
// //Uint8List fileData;
|
||||||
|
// String fileFath;
|
||||||
|
// ImageSaver.save('extended_image_cropped_image.jpg', v).then((value) {
|
||||||
|
// fileFath = value;
|
||||||
|
// // var fileFath = await ImagePickerSaver.saveFile(fileData: fileData);
|
||||||
|
// print('my save fileFath : $fileFath');
|
||||||
|
// });
|
||||||
|
// }).catchError((e) {
|
||||||
|
// FijkLog.d("get snapshot failed");
|
||||||
|
// });
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
import 'dart:ui';
|
import 'dart:ui';
|
||||||
import 'dart:io';
|
|
||||||
|
|
||||||
|
import 'package:fijkplayer/fijkplayer.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:flutter_screenutil/screen_util.dart';
|
import 'package:flutter_screenutil/screen_util.dart';
|
||||||
@@ -13,38 +13,43 @@ import 'package:hyzp_ybqx/components/dioFun.dart';
|
|||||||
import 'package:hyzp_ybqx/provider/player_ratio.dart';
|
import 'package:hyzp_ybqx/provider/player_ratio.dart';
|
||||||
import 'package:hyzp_ybqx/provider/player_region.dart';
|
import 'package:hyzp_ybqx/provider/player_region.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
import 'package:fijkplayer/fijkplayer.dart';
|
|
||||||
|
|
||||||
import '../components/commonFun.dart';
|
import '../components/commonFun.dart';
|
||||||
import '../services/Storage.dart';
|
import '../services/Storage.dart';
|
||||||
|
import '../my_fijkPanel_fix/my_panel3.dart';
|
||||||
|
|
||||||
|
const _kControlViewTypes = [kControlViewTypeDefault, kControlViewTypeWithout];
|
||||||
|
|
||||||
class SuperPlayerPage extends StatefulWidget {
|
class SuperPlayerPage extends StatefulWidget {
|
||||||
SuperPlayerPage(
|
SuperPlayerPage(
|
||||||
{@required this.url,
|
{@required this.url,
|
||||||
|
this.urlType = 'mp4', // 视频类型:mp4,rtmp
|
||||||
this.id = -2, // 播放点位视频的点位编号,-2 表示播放违章视频
|
this.id = -2, // 播放点位视频的点位编号,-2 表示播放违章视频
|
||||||
this.dwip = '', // 点位IP,用于点位视频控制球机方向
|
this.dwip = '', // 点位IP,用于点位视频控制球机方向
|
||||||
this.loop = 1,
|
this.loop = 1,
|
||||||
this.title = 'Tencent Player',
|
this.title = 'Tencent Player',
|
||||||
Key key})
|
Key key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
String dwip;
|
|
||||||
String url;
|
String url;
|
||||||
String title;
|
String urlType;
|
||||||
int loop; //设置播放循环,默认播放器的循环次数是1, 即不循环播放。如果设置循环次数0,表示无限循环。
|
|
||||||
int id;
|
int id;
|
||||||
|
String dwip;
|
||||||
|
int loop; //设置播放循环,默认播放器的循环次数是1, 即不循环播放。如果设置循环次数0,表示无限循环。
|
||||||
|
String title;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_SuperPlayerPageState createState() => _SuperPlayerPageState();
|
_SuperPlayerPageState createState() => _SuperPlayerPageState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _SuperPlayerPageState extends State<SuperPlayerPage> with SuperPlayerListener {
|
class _SuperPlayerPageState extends State<SuperPlayerPage>
|
||||||
final SuperPlayerController _playerController = SuperPlayerController();
|
with WidgetsBindingObserver, AutomaticKeepAliveClientMixin {
|
||||||
final FijkPlayer _ijkPlayer = (){
|
// SuperPlayerController _playerController = SuperPlayerController();
|
||||||
var player = FijkPlayer();
|
|
||||||
player.setOption(FijkOption.playerCategory, "packet-buffering", 0);
|
@override
|
||||||
player.setOption(FijkOption.formatCategory, "probesize", 1024);
|
// TODO: implement wantKeepAlive
|
||||||
return player;
|
bool get wantKeepAlive => true;
|
||||||
}();
|
|
||||||
|
final FijkPlayer _playerController = FijkPlayer();
|
||||||
|
|
||||||
String _sdkVersion = 'Unknown';
|
String _sdkVersion = 'Unknown';
|
||||||
List<String> _logs = [];
|
List<String> _logs = [];
|
||||||
@@ -55,66 +60,127 @@ class _SuperPlayerPageState extends State<SuperPlayerPage> with SuperPlayerListe
|
|||||||
Playing = false;
|
Playing = false;
|
||||||
// 云台控制代码:1:停止动作、3:启动雨刷、11:焦距变大、12:焦距变小
|
// 云台控制代码:1:停止动作、3:启动雨刷、11:焦距变大、12:焦距变小
|
||||||
setSphericalCameraDio(id: widget.id, dwip: widget.dwip, cmdCode: 1);
|
setSphericalCameraDio(id: widget.id, dwip: widget.dwip, cmdCode: 1);
|
||||||
|
_playerController.release(); // 必须显示释放视频播放资源,否则即使退出视频播放页面后台还在获取视频流
|
||||||
super.dispose();
|
super.dispose();
|
||||||
_ijkPlayer.release();
|
|
||||||
_playerController.resetPlayer();
|
|
||||||
_playerController.release();
|
|
||||||
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
init();
|
//initPlatformState();
|
||||||
|
// Future.delayed(const Duration(milliseconds: 1000), () {
|
||||||
|
// _playerController.playWithModel(SuperPlayerModel(url: widget.url));
|
||||||
|
// setState(() {
|
||||||
|
// });
|
||||||
|
// });
|
||||||
|
// init();
|
||||||
|
|
||||||
|
WidgetsBinding.instance.addObserver(this);
|
||||||
|
|
||||||
|
_playerController.setOption(FijkOption.hostCategory, "enable-snapshot", 1);
|
||||||
|
_playerController.setOption(FijkOption.playerCategory, "mediacodec-all-videos", 1);
|
||||||
|
startPlay();
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> init() async {
|
void startPlay() async {
|
||||||
await _playerController.addListener(this);
|
// await _playerController.addListener(() {});
|
||||||
await initPlatformState();
|
|
||||||
if (!mounted) return;
|
if (!mounted) return;
|
||||||
|
print('mounted = ${mounted}');
|
||||||
|
|
||||||
if (_useIJKPlayer) {
|
await _playerController.setLoop(widget.loop); // 0无限循环,1循环一次,2循环两次,以此类推
|
||||||
await _playerController.removeListener(this);
|
await _playerController.setOption(FijkOption.playerCategory, "mediacodec-all-videos", 1);
|
||||||
_ijkPlayer.addListener(_fijkValueListener);
|
await _playerController.setOption(FijkOption.hostCategory, "enable-snapshot", 1);
|
||||||
_ijkPlayer.setDataSource(widget.url, autoPlay: true);
|
await _playerController.setOption(FijkOption.hostCategory, "request-screen-on", 1);
|
||||||
} else {
|
await _playerController.setOption(FijkOption.hostCategory, "request-audio-focus", 1);
|
||||||
await _playerController.uiHideDanmu();
|
await _playerController.setOption(FijkOption.hostCategory, "enable-accurate-seek", 1);
|
||||||
if (0 == widget.loop) {
|
// 播放“rmtp”等网络视频设置
|
||||||
await _playerController.setLoop(true);
|
if (widget.urlType != 'mp4') {
|
||||||
}
|
/// fijkplayer播放点位视频延迟比较大优化-OK,改完后约1秒钟就能打开 - Being
|
||||||
await _playerController.playWithModel(testSuperPlayerModel);
|
// 是否开启预缓冲,一般直播项目会开启,达到秒开的效果,不过带来了播放丢帧卡顿的体验
|
||||||
|
await _playerController.setOption(FijkOption.playerCategory, "packet-buffering", 0);
|
||||||
|
// 播放前的探测Size,默认是1024K(1M), 改小一点会出画面更快
|
||||||
|
// await player.setOption(FijkOption.formatCategory, "probesize", 200); // 1.3S打开
|
||||||
|
await _playerController.setOption(FijkOption.formatCategory, "probesize", 1024); // 避免第一帧花屏
|
||||||
|
await _playerController.setOption(FijkOption.formatCategory, 'http-detect-range-support', 0);
|
||||||
|
// 设置播放前的探测时间 1,达到首屏秒开效果
|
||||||
|
await _playerController.setOption(FijkOption.formatCategory, "analyzeduration", 1);
|
||||||
|
// 缩短播放的rtmp视频延迟在1s内
|
||||||
|
await _playerController.setOption(FijkOption.formatCategory, "fflags", "nobuffer");
|
||||||
|
// 支持硬解: 1 开启, O 关闭
|
||||||
|
await _playerController.setOption(FijkOption.playerCategory, "mediacodec-hevc", 1);
|
||||||
|
|
||||||
|
/// fijkplayer播放点位视频延迟比较大优化-OK,改完后半秒钟就能打开 - End
|
||||||
|
|
||||||
|
// await _playerController.setOption(FijkOption.hostCategory, "request-screen-on", 1);
|
||||||
|
// await _playerController.setOption(FijkOption.hostCategory, "request-audio-focus", 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
await _playerController.setDataSource(widget.url, autoPlay: true).catchError((e) {
|
||||||
|
print("setDataSource error: $e");
|
||||||
|
});
|
||||||
|
playerRegionProvide.changePlayerState(bPlaying);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool get _useIJKPlayer {
|
// Future<void> init() async {
|
||||||
return Platform.isIOS && widget.url.startsWith("rtmp");
|
// await _playerController.addListener(this);
|
||||||
}
|
// await initPlatformState();
|
||||||
|
// if (!mounted) return;
|
||||||
|
// print('mounted = ${mounted}');
|
||||||
|
// // 开启调试日志
|
||||||
|
// //await FTXPlayerController.setConsoleEnabled(true);
|
||||||
|
// // 初始化播放器
|
||||||
|
// //await _controller.initialize(onlyAudio: true);
|
||||||
|
//
|
||||||
|
// await _playerController.uiHideDanmu(); // 隐藏弹幕
|
||||||
|
// //设置播放循环,默认播放器的循环次数是1, 即不循环播放。如果设置循环次数0,表示无限循环。
|
||||||
|
// if (0 == widget.loop) {
|
||||||
|
// await _playerController.setLoop(true);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// await _playerController.playWithModel(testSuperPlayerModel);
|
||||||
|
// //_controller.play("http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4");
|
||||||
|
// // _controller
|
||||||
|
// // .play('rtmp://125.64.218.67:9901/rtp/gb_play_34020000001320003016_34020000001320003016');
|
||||||
|
// // 设置循环播放
|
||||||
|
// //await _controller.setLoop(true);
|
||||||
|
// // 开始播放
|
||||||
|
// //await _controller.play("http://125.64.218.67:9908/video/2_6063_20210409_140608_川Q31715.mp4");
|
||||||
|
// }
|
||||||
|
|
||||||
SuperPlayerModel get testSuperPlayerModel {
|
SuperPlayerModel get testSuperPlayerModel {
|
||||||
return SuperPlayerModel(url: widget.url);
|
// int appId = 1252463788;
|
||||||
|
// String fileId = "5285890781763144364";
|
||||||
|
|
||||||
|
SuperPlayerModel superPlayerModel = SuperPlayerModel(
|
||||||
|
url: widget.url,
|
||||||
|
// appId: appId,
|
||||||
|
// videoId: SuperPlayerVideoId(fileId: fileId),
|
||||||
|
);
|
||||||
|
return superPlayerModel;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Platform messages are asynchronous, so we initialize in an async method.
|
// Platform messages are asynchronous, so we initialize in an async method.
|
||||||
Future<void> initPlatformState() async {
|
// Future<void> initPlatformState() async {
|
||||||
String sdkVersion;
|
// String sdkVersion;
|
||||||
// Platform messages may fail, so we use a try/catch PlatformException.
|
// // Platform messages may fail, so we use a try/catch PlatformException.
|
||||||
try {
|
// try {
|
||||||
sdkVersion = await FlutterSuperPlayer.sdkVersion;
|
// sdkVersion = await FlutterSuperPlayer.sdkVersion;
|
||||||
} on PlatformException {
|
// } on PlatformException {
|
||||||
sdkVersion = 'Failed to get platform version.';
|
// sdkVersion = 'Failed to get platform version.';
|
||||||
}
|
// }
|
||||||
print('sdkVersion = ${sdkVersion}');
|
// print('sdkVersion = ${sdkVersion}');
|
||||||
print('mounted = ${mounted}');
|
// print('mounted = ${mounted}');
|
||||||
|
//
|
||||||
// If the widget was removed from the tree while the asynchronous platform
|
// // If the widget was removed from the tree while the asynchronous platform
|
||||||
// message was in flight, we want to discard the reply rather than calling
|
// // message was in flight, we want to discard the reply rather than calling
|
||||||
// setState to update our non-existent appearance.
|
// // setState to update our non-existent appearance.
|
||||||
if (!mounted) return;
|
// if (!mounted) return;
|
||||||
|
//
|
||||||
setState(() {
|
// setState(() {
|
||||||
_sdkVersion = sdkVersion;
|
// _sdkVersion = sdkVersion;
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
|
|
||||||
void _addLog(String method, dynamic data) {
|
void _addLog(String method, dynamic data) {
|
||||||
_logs.add('>>>$method');
|
_logs.add('>>>$method');
|
||||||
@@ -128,16 +194,20 @@ class _SuperPlayerPageState extends State<SuperPlayerPage> with SuperPlayerListe
|
|||||||
|
|
||||||
PlayerRatioProvide playerRatioProvide;
|
PlayerRatioProvide playerRatioProvide;
|
||||||
|
|
||||||
|
FijkPanelWidgetBuilder _fijkPanelWidgetBuilder;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
_fijkPanelWidgetBuilder = fijkPanel2Builder3(snapShot: true, player: _playerController);
|
||||||
playerRegionProvide = Provider.of<PlayerRegionProvide>(context);
|
playerRegionProvide = Provider.of<PlayerRegionProvide>(context);
|
||||||
playerRatioProvide = Provider.of<PlayerRatioProvide>(context);
|
playerRatioProvide = Provider.of<PlayerRatioProvide>(context);
|
||||||
// List<Widget> listData = getDataListControl2();
|
|
||||||
double btnHeight1 = 70; //第一按钮行高度
|
// // List<Widget> listData = getDataListControl2();
|
||||||
double btnHeight2 = 160; //第二按钮行高度
|
// double btnHeight1 = 70; //第一按钮行高度
|
||||||
int btnCount = 4; //每行按钮个数
|
// double btnHeight2 = 160; //第二按钮行高度
|
||||||
// int btnCount3 = listData.length; //每行按钮个数
|
// int btnCount = 4; //每行按钮个数
|
||||||
var mediaSize = MediaQuery.of(context).size;
|
// // int btnCount3 = listData.length; //每行按钮个数
|
||||||
|
// var mediaSize = MediaQuery.of(context).size;
|
||||||
|
|
||||||
// widget.id:播放点位视频的点位编号,-2 表示播放违章视频
|
// widget.id:播放点位视频的点位编号,-2 表示播放违章视频
|
||||||
double btn_left = -2 == widget.id ? 347 : 70; //第一按钮行高度
|
double btn_left = -2 == widget.id ? 347 : 70; //第一按钮行高度
|
||||||
@@ -147,6 +217,7 @@ class _SuperPlayerPageState extends State<SuperPlayerPage> with SuperPlayerListe
|
|||||||
double _outerRadius = 270;
|
double _outerRadius = 270;
|
||||||
double _innerRadius = _outerRadius / 2;
|
double _innerRadius = _outerRadius / 2;
|
||||||
|
|
||||||
|
//double barHeight = bFullScreen ? 0 : MediaQueryData.fromWindow(window).padding.top;
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: bFullScreen
|
appBar: bFullScreen
|
||||||
? null
|
? null
|
||||||
@@ -157,9 +228,13 @@ class _SuperPlayerPageState extends State<SuperPlayerPage> with SuperPlayerListe
|
|||||||
automaticallyImplyLeading: false,
|
automaticallyImplyLeading: false,
|
||||||
centerTitle: true,
|
centerTitle: true,
|
||||||
titleSpacing: 0.0,
|
titleSpacing: 0.0,
|
||||||
|
//设置title的左边距
|
||||||
flexibleSpace: Container(
|
flexibleSpace: Container(
|
||||||
|
//SizedBox(height: ScreenUtil().statusBarHeight), //显示顶部状态栏
|
||||||
|
// SizedBox(height: ScreenUtil().setHeight(10)), //显示顶部状态栏
|
||||||
padding: EdgeInsets.only(top: ScreenUtil().statusBarHeight), //留出顶部状态栏高度
|
padding: EdgeInsets.only(top: ScreenUtil().statusBarHeight), //留出顶部状态栏高度
|
||||||
child: Container(
|
child: Container(
|
||||||
|
//height: ScreenUtil().setHeight(173),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
gradient: LinearGradient(
|
gradient: LinearGradient(
|
||||||
begin: Alignment.centerLeft,
|
begin: Alignment.centerLeft,
|
||||||
@@ -170,6 +245,12 @@ class _SuperPlayerPageState extends State<SuperPlayerPage> with SuperPlayerListe
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
// decoration: BoxDecoration(
|
||||||
|
// gradient: LinearGradient(colors: [
|
||||||
|
// Color(0xFF0018EB),
|
||||||
|
// Color(0xFF01C1D9),
|
||||||
|
// ], begin: Alignment.bottomCenter, end: Alignment.topCenter),
|
||||||
|
// ),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
title: Padding(
|
title: Padding(
|
||||||
@@ -182,7 +263,7 @@ class _SuperPlayerPageState extends State<SuperPlayerPage> with SuperPlayerListe
|
|||||||
iconData: Icons.chevron_left_outlined,
|
iconData: Icons.chevron_left_outlined,
|
||||||
onPress: () {
|
onPress: () {
|
||||||
getingDwVideo = false;
|
getingDwVideo = false;
|
||||||
pop();
|
Navigator.pop(context);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
@@ -199,12 +280,16 @@ class _SuperPlayerPageState extends State<SuperPlayerPage> with SuperPlayerListe
|
|||||||
),
|
),
|
||||||
body: WillPopScope(
|
body: WillPopScope(
|
||||||
child: Container(
|
child: Container(
|
||||||
|
// height: ScreenUtil().screenHeight -
|
||||||
|
// ScreenUtil().statusBarHeight -
|
||||||
|
// ScreenUtil().bottomBarHeight,
|
||||||
color: Color.fromRGBO(224, 224, 224, 1),
|
color: Color.fromRGBO(224, 224, 224, 1),
|
||||||
child: Column(
|
child: Column(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
//第2行组件,视频播放区
|
//第2行组件,视频播放区
|
||||||
Center(
|
Center(
|
||||||
child: Container(
|
child: Container(
|
||||||
|
//padding: EdgeInsets.only(top: barHeight),
|
||||||
alignment: Alignment(0, -1),
|
alignment: Alignment(0, -1),
|
||||||
width: MediaQuery.of(context).size.width,
|
width: MediaQuery.of(context).size.width,
|
||||||
height: MediaQuery.of(context).size.width * (9 / 16),
|
height: MediaQuery.of(context).size.width * (9 / 16),
|
||||||
@@ -212,7 +297,30 @@ class _SuperPlayerPageState extends State<SuperPlayerPage> with SuperPlayerListe
|
|||||||
child: Stack(
|
child: Stack(
|
||||||
children: [
|
children: [
|
||||||
_playState <= 2 ? getMoreWidget(strokeWidth: 3.0) : SizedBox.shrink(),
|
_playState <= 2 ? getMoreWidget(strokeWidth: 3.0) : SizedBox.shrink(),
|
||||||
_useIJKPlayer ? FijkView(player: _ijkPlayer, color: Colors.black) : SuperPlayerView(controller: _playerController)
|
// SuperPlayerView(
|
||||||
|
// controller: _playerController,
|
||||||
|
// controlViewType: _kControlViewTypes[0],
|
||||||
|
// ),
|
||||||
|
|
||||||
|
FijkView(
|
||||||
|
//设置视频区域背景颜色-OK
|
||||||
|
color: Colors.black,
|
||||||
|
player: _playerController,
|
||||||
|
// panelBuilder: fijkPanel2Builder(snapShot: true),
|
||||||
|
panelBuilder: _fijkPanelWidgetBuilder,
|
||||||
|
fsFit: FijkFit.fill,
|
||||||
|
// panelBuilder: simplestUI,
|
||||||
|
// panelBuilder: (FijkPlayer player, BuildContext context,
|
||||||
|
// Size viewSize, Rect texturePos) {
|
||||||
|
// return CustomFijkPanel(
|
||||||
|
// player: player,
|
||||||
|
// buildContext: context,
|
||||||
|
// viewSize: viewSize,
|
||||||
|
// texturePos: texturePos);
|
||||||
|
// },
|
||||||
|
),
|
||||||
|
|
||||||
|
//_playState < 3 ? SizedBox.shrink() : getMoreWidget(strokeWidth: 3.0),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -225,6 +333,7 @@ class _SuperPlayerPageState extends State<SuperPlayerPage> with SuperPlayerListe
|
|||||||
children: [
|
children: [
|
||||||
SizedBox(width: ScreenUtil().setWidth(btn_left)),
|
SizedBox(width: ScreenUtil().setWidth(btn_left)),
|
||||||
getRoundButton(
|
getRoundButton(
|
||||||
|
//(bPlaying) ? '暂停' : '播放',
|
||||||
text: playerRegionProvide.playerText,
|
text: playerRegionProvide.playerText,
|
||||||
icon: playerRegionProvide.playerIcon,
|
icon: playerRegionProvide.playerIcon,
|
||||||
diameter: 130,
|
diameter: 130,
|
||||||
@@ -377,27 +486,41 @@ class _SuperPlayerPageState extends State<SuperPlayerPage> with SuperPlayerListe
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
// child: GridView.custom(
|
||||||
|
// // padding: EdgeInsets.only(
|
||||||
|
// // left: ScreenUtil().setWidth(35), right: ScreenUtil().setWidth(35)),
|
||||||
|
// gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||||
|
// crossAxisCount: btnCount3,
|
||||||
|
// mainAxisSpacing: 0,
|
||||||
|
// crossAxisSpacing: 1,
|
||||||
|
// childAspectRatio: ratio3,
|
||||||
|
// ),
|
||||||
|
// childrenDelegate: SliverChildBuilderDelegate((context, position) {
|
||||||
|
// return getItemContainer(listData[position]);
|
||||||
|
// }, childCount: btnCount3)),
|
||||||
),
|
),
|
||||||
|
//SizedBox(height: ScreenUtil().setHeight(49)),
|
||||||
|
//Divider(color: Colors.blue),
|
||||||
|
//第4行组件,分隔栏
|
||||||
|
// Container(
|
||||||
|
// //height: 11,
|
||||||
|
// height: ScreenUtil().setHeight(28),
|
||||||
|
// color: Color.fromRGBO(224, 224, 224, 1),
|
||||||
|
// ),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
onWillPop: () {
|
onWillPop: () {
|
||||||
|
Playing = false;
|
||||||
|
getingDwVideo = false;
|
||||||
// 云台控制代码:1:停止动作、3:启动雨刷、11:焦距变大、12:焦距变小
|
// 云台控制代码:1:停止动作、3:启动雨刷、11:焦距变大、12:焦距变小
|
||||||
setSphericalCameraDio(id: widget.id, dwip: widget.dwip, cmdCode: 1);
|
setSphericalCameraDio(id: widget.id, dwip: widget.dwip, cmdCode: 1);
|
||||||
pop();
|
Navigator.pop(context); //关闭弹框,播放输入视频地址
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
pop() async {
|
|
||||||
Playing = false;
|
|
||||||
getingDwVideo = false;
|
|
||||||
_ijkPlayer.removeListener(() {});
|
|
||||||
await _playerController.removeListener(this);
|
|
||||||
Navigator.pop(context);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void onClickFloatCloseBtn() {
|
void onClickFloatCloseBtn() {
|
||||||
_addLog('onClickFloatCloseBtn', {});
|
_addLog('onClickFloatCloseBtn', {});
|
||||||
@@ -406,14 +529,13 @@ class _SuperPlayerPageState extends State<SuperPlayerPage> with SuperPlayerListe
|
|||||||
@override
|
@override
|
||||||
void onClickSmallReturnBtn() {
|
void onClickSmallReturnBtn() {
|
||||||
_addLog('onClickSmallReturnBtn', {});
|
_addLog('onClickSmallReturnBtn', {});
|
||||||
pop();
|
Navigator.maybePop(context);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void onFullScreenChange(bool isFullScreen) {
|
void onFullScreenChange(bool isFullScreen) {
|
||||||
_addLog('onFullScreenChange', {'isFullScreen': isFullScreen});
|
_addLog('onFullScreenChange', {'isFullScreen': isFullScreen});
|
||||||
if (bFullScreen == isFullScreen) return;
|
bFullScreen = !bFullScreen;
|
||||||
bFullScreen = isFullScreen;
|
|
||||||
setState(() {});
|
setState(() {});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -452,12 +574,6 @@ class _SuperPlayerPageState extends State<SuperPlayerPage> with SuperPlayerListe
|
|||||||
_addLog('onStartFloatWindowPlay', {});
|
_addLog('onStartFloatWindowPlay', {});
|
||||||
}
|
}
|
||||||
|
|
||||||
void _fijkValueListener() {
|
|
||||||
FijkValue value = _ijkPlayer.value;
|
|
||||||
onPlayStateChange(value.state == FijkState.started ? 1 : 2);
|
|
||||||
onFullScreenChange(value.fullScreen);
|
|
||||||
}
|
|
||||||
|
|
||||||
//生成圆形按钮部件,基于图标
|
//生成圆形按钮部件,基于图标
|
||||||
Widget getRoundButton(
|
Widget getRoundButton(
|
||||||
{double diameter = 144,
|
{double diameter = 144,
|
||||||
@@ -516,7 +632,13 @@ class _SuperPlayerPageState extends State<SuperPlayerPage> with SuperPlayerListe
|
|||||||
child: Image.asset(image_path,
|
child: Image.asset(image_path,
|
||||||
fit: BoxFit.fitWidth,
|
fit: BoxFit.fitWidth,
|
||||||
width: ScreenUtil().setWidth(imageSize),
|
width: ScreenUtil().setWidth(imageSize),
|
||||||
|
//height: ScreenUtil().setWidth(iconSize),
|
||||||
color: Color.fromRGBO(52, 157, 237, 1)),
|
color: Color.fromRGBO(52, 157, 237, 1)),
|
||||||
|
// child: Icon(
|
||||||
|
// icon,
|
||||||
|
// size: ScreenUtil().setWidth(iconSize),
|
||||||
|
// color: Color.fromRGBO(52, 157, 237, 1),
|
||||||
|
// ),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: color_bkg,
|
color: color_bkg,
|
||||||
borderRadius: BorderRadius.all(Radius.circular(200)),
|
borderRadius: BorderRadius.all(Radius.circular(200)),
|
||||||
@@ -532,21 +654,26 @@ class _SuperPlayerPageState extends State<SuperPlayerPage> with SuperPlayerListe
|
|||||||
|
|
||||||
bool bPlaying = true;
|
bool bPlaying = true;
|
||||||
|
|
||||||
Future<void> playOrPause() async {
|
void playOrPause() {
|
||||||
|
// playerRegionProvide.changePlayerState(bPlaying);
|
||||||
|
//
|
||||||
|
// if (bPlaying) {
|
||||||
|
// _playerController.start();
|
||||||
|
// } else {
|
||||||
|
// _playerController.pause();
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// setState(() {
|
||||||
|
// bPlaying = !bPlaying;
|
||||||
|
// });
|
||||||
|
|
||||||
//state : 1 播放状态,2 暂停状态
|
//state : 1 播放状态,2 暂停状态
|
||||||
int state;
|
if (FijkState.started == _playerController.state) {
|
||||||
if (_useIJKPlayer) {
|
|
||||||
state = _ijkPlayer.state == FijkState.started ? 1 : 2;
|
|
||||||
} else {
|
|
||||||
state = await _playerController.getPlayState();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (1 == state) {
|
|
||||||
bPlaying = false;
|
bPlaying = false;
|
||||||
_useIJKPlayer ? _ijkPlayer.pause() : _playerController.pause();
|
_playerController.pause();
|
||||||
} else {
|
} else {
|
||||||
bPlaying = true;
|
bPlaying = true;
|
||||||
_useIJKPlayer ? _ijkPlayer.start() : _playerController.resume();
|
_playerController.start();
|
||||||
}
|
}
|
||||||
playerRegionProvide.changePlayerState(bPlaying);
|
playerRegionProvide.changePlayerState(bPlaying);
|
||||||
Storage.setString('bPlaying', bPlaying ? 'true' : 'false');
|
Storage.setString('bPlaying', bPlaying ? 'true' : 'false');
|
||||||
@@ -556,13 +683,30 @@ class _SuperPlayerPageState extends State<SuperPlayerPage> with SuperPlayerListe
|
|||||||
void restartPlay(String url) async {
|
void restartPlay(String url) async {
|
||||||
_playState = 4;
|
_playState = 4;
|
||||||
bPlaying = true;
|
bPlaying = true;
|
||||||
if (_useIJKPlayer) {
|
|
||||||
await _ijkPlayer.reset();
|
await _playerController.stop();
|
||||||
_ijkPlayer.setDataSource(widget.url, autoPlay: true);
|
await _playerController.reset();
|
||||||
} else {
|
startPlay();
|
||||||
_playerController.resetPlayer();
|
|
||||||
_playerController.resume();
|
// _playerController.resetPlayer();
|
||||||
}
|
// _playerController.resume();
|
||||||
|
|
||||||
|
// //writeCurrentPosFile();
|
||||||
|
// await player.stop();
|
||||||
|
// await player.reset();
|
||||||
|
// await player.setOption(FijkOption.playerCategory, "mediacodec-all-videos", 1);
|
||||||
|
// await player.setOption(FijkOption.hostCategory, "enable-snapshot", 1);
|
||||||
|
// await player.setOption(FijkOption.hostCategory, "request-screen-on", 1);
|
||||||
|
// await player.setOption(FijkOption.hostCategory, "request-audio-focus", 1);
|
||||||
|
// await player.setOption(FijkOption.hostCategory, "enable-accurate-seek", 1);
|
||||||
|
// await player.setOption(FijkOption.hostCategory, "max-buffer-size", 500 * 1024);
|
||||||
|
// await player.setDataSource(url, autoPlay: true).catchError((e) {
|
||||||
|
// print("setDataSource error: $e");
|
||||||
|
// });
|
||||||
|
// await player.setLoop(widget.loop); //设置播放循环,默认播放器的循环次数是1, 即不循环播放。如果设置循环次数0,表示无限循环。
|
||||||
|
// bPlaying = true;
|
||||||
|
// setState(() {});
|
||||||
|
// playerRegionProvide.changePlayerState(bPlaying);
|
||||||
}
|
}
|
||||||
|
|
||||||
//生成播放控制区第2行按钮List
|
//生成播放控制区第2行按钮List
|
||||||
|
|||||||
@@ -356,6 +356,13 @@ packages:
|
|||||||
relative: true
|
relative: true
|
||||||
source: path
|
source: path
|
||||||
version: "0.0.3"
|
version: "0.0.3"
|
||||||
|
flutter_svg:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: flutter_svg
|
||||||
|
url: "https://pub.flutter-io.cn"
|
||||||
|
source: hosted
|
||||||
|
version: "0.19.1"
|
||||||
flutter_swiper:
|
flutter_swiper:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
@@ -457,6 +464,15 @@ packages:
|
|||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.flutter-io.cn"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.1.1"
|
version: "1.1.1"
|
||||||
|
map_launcher:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
path: "."
|
||||||
|
ref: ea5bb6d38102be8ea1a672c9681b1749fe1eed4b
|
||||||
|
resolved-ref: ea5bb6d38102be8ea1a672c9681b1749fe1eed4b
|
||||||
|
url: "https://git.mluoc.tech/mlch911/map_launcher.git"
|
||||||
|
source: git
|
||||||
|
version: "1.1.3+1"
|
||||||
matcher:
|
matcher:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
|||||||
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
|
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
|
||||||
# Read more about iOS versioning at
|
# Read more about iOS versioning at
|
||||||
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
||||||
version: 1.4.33+20220515
|
version: 1.6.5+20250527
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ">=2.7.0 <3.0.0"
|
sdk: ">=2.7.0 <3.0.0"
|
||||||
@@ -36,7 +36,7 @@ dependencies:
|
|||||||
cupertino_icons: ^1.0.0
|
cupertino_icons: ^1.0.0
|
||||||
|
|
||||||
# hyzp_ybqx00_yibin Project Adds
|
# hyzp_ybqx00_yibin Project Adds
|
||||||
fijkplayer: ^0.8.7
|
fijkplayer: ^0.8.8
|
||||||
path_provider: ^1.6.14
|
path_provider: ^1.6.14
|
||||||
permission_handler: ^5.0.1+1
|
permission_handler: ^5.0.1+1
|
||||||
|
|
||||||
@@ -90,9 +90,9 @@ dependencies:
|
|||||||
flutter_downloader: ^1.5.2 # 下载文件
|
flutter_downloader: ^1.5.2 # 下载文件
|
||||||
package_info: ^0.4.3+2 # 检测版本号
|
package_info: ^0.4.3+2 # 检测版本号
|
||||||
progress_dialog: ^1.2.0 # 显示进度对话框
|
progress_dialog: ^1.2.0 # 显示进度对话框
|
||||||
|
|
||||||
app_installer: ^0.5.0 # Flutter 2.1,修复 Android 11 上允许权限后应用重启的问题,https://pub.dev/packages/app_installer
|
app_installer: ^0.5.0 # Flutter 2.1,修复 Android 11 上允许权限后应用重启的问题,https://pub.dev/packages/app_installer
|
||||||
|
|
||||||
badges: ^1.0.3 # App中的图标红点
|
badges: ^1.0.3 # App中的图标红点
|
||||||
|
|
||||||
flutter_echarts: ^1.5.0
|
flutter_echarts: ^1.5.0
|
||||||
@@ -108,6 +108,14 @@ dependencies:
|
|||||||
# 添加水印插件
|
# 添加水印插件
|
||||||
disable_screenshots: ^0.1.0
|
disable_screenshots: ^0.1.0
|
||||||
|
|
||||||
|
# 导航相关插件
|
||||||
|
map_launcher:
|
||||||
|
git:
|
||||||
|
url: https://git.mluoc.tech/mlch911/map_launcher.git
|
||||||
|
ref: ea5bb6d38102be8ea1a672c9681b1749fe1eed4b
|
||||||
|
|
||||||
|
flutter_svg: ^0.19.1
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
sdk: flutter
|
sdk: flutter
|
||||||
|
|||||||