Compare commits

..

No commits in common. 'b120d2e8e40271da1a67672146e9fd1af6128f0d' and '94682671bf14905674a3fd9f5895833ab764f465' have entirely different histories.

@ -1,3 +1,4 @@
{ {
"flutterSdkVersion": "1.22.6" "flutterSdkVersion": "1.22.6",
"flavors": {}
} }

@ -1,4 +0,0 @@
{
"flutter": "1.22.6",
"flavors": {}
}

4
.gitignore vendored

@ -30,6 +30,7 @@
.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
@ -43,6 +44,3 @@ 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,8 +1,10 @@
{ {
"dart.flutterSdkPath": ".fvm/versions/1.22.6", "dart.flutterSdkPath": ".fvm/flutter_sdk",
// Remove .fvm files from search
"search.exclude": { "search.exclude": {
"**/.fvm": true "**/.fvm": true
}, },
// Remove from file watching
"files.watcherExclude": { "files.watcherExclude": {
"**/.fvm": true "**/.fvm": true
} }

@ -41,9 +41,6 @@ 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":20250521,"versionName":"1.6.4","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}] [{"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":{}}]

@ -36,9 +36,6 @@
<!-- 请求忽略电池优化,用于后台定时提醒等 --> <!-- 请求忽略电池优化,用于后台定时提醒等 -->
<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.4' classpath 'com.android.tools.build:gradle:3.5.0'
} }
} }

@ -2,4 +2,3 @@ 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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

@ -64,12 +64,8 @@ PODS:
- FMDB (2.7.5): - FMDB (2.7.5):
- FMDB/standard (= 2.7.5) - FMDB/standard (= 2.7.5)
- FMDB/standard (2.7.5) - FMDB/standard (2.7.5)
- geolocator (6.2.0):
- Flutter
- 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
@ -111,9 +107,7 @@ DEPENDENCIES:
- flutter_drag_scale (from `.symlinks/plugins/flutter_drag_scale/ios`) - flutter_drag_scale (from `.symlinks/plugins/flutter_drag_scale/ios`)
- 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`)
- geolocator (from `.symlinks/plugins/geolocator/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`)
@ -168,12 +162,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/flutter_superplayer/ios" :path: ".symlinks/plugins/flutter_superplayer/ios"
fluttertoast: fluttertoast:
:path: ".symlinks/plugins/fluttertoast/ios" :path: ".symlinks/plugins/fluttertoast/ios"
geolocator:
:path: ".symlinks/plugins/geolocator/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:
@ -192,42 +182,40 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/webview_flutter/ios" :path: ".symlinks/plugins/webview_flutter/ios"
SPEC CHECKSUMS: SPEC CHECKSUMS:
AFNetworking: 3bd23d814e976cd148d7d44c3ab78017b744cd58 AFNetworking: 7864c38297c79aaca1500c33288e429c3451fdce
android_power_manager: f4c55446e089d4e7efce3c4f7f9e6e2d59bf7dff android_power_manager: c35cabf2188eaf836e8b4f2f4bad9aaa876d2f93
app_installer: 3de16a106f56b77eca43eece1ed723202b22dc52 app_installer: 6c31be407728fb6d67cce038fd8547e563e6982c
audioplayers: 2de44c6cb9d765742830def08bf60d8f6e859ae7 audioplayers: 53f0f30789b10ab2009771c6c79def00980945e4
BaiduMapKit: 40a4382633859bd569d40da9f9a2e98a277dd28b BaiduMapKit: 40a4382633859bd569d40da9f9a2e98a277dd28b
BIJKPlayer: 4c5d66e5cb99ae5bade6f22a4fcc031722a81c64 BIJKPlayer: 4c5d66e5cb99ae5bade6f22a4fcc031722a81c64
camera: 299a04dd889d65397e64c94545796e60aabb11ab camera: a0ca5080336f7af47b88436e5e26da3dee5568f0
city_pickers: 411a41e68eab0fa2f078317a9971cd454f4c9da4 city_pickers: b0370f4c35c201723b5b7fcce10ec29b59d5bc35
device_info: 52e8c0c9c61def8d0a92bf175f5f500abbea04bc device_info: d7d233b645a32c40dfdc212de5cf646ca482f175
disable_screenshots: 20150b02b804ce1f3f10e3b1e6f088e3134eee90 disable_screenshots: 3f3a1881efa341fcdad395fb2b25e11a9a7bce0b
fijkplayer: 5db7b07d644d06584c3629f20f697909c7ec9eff fijkplayer: 0d3793a2822d030ef5bba77f904bff1f7a91a115
Flutter: 0e3d915762c693b495b44d77113d4970485de6ec Flutter: 0e3d915762c693b495b44d77113d4970485de6ec
flutter_background_service: cd346960455b6e2315353addac6bedc5a298346c flutter_background_service: a4644870cc76287aaa6147b47107e52680b79c90
flutter_bmfbase: 4e95fc35604042ba54f91c5bbaeacb4a4f853164 flutter_bmfbase: 8ac2c94f3f110daec8e499dc13f8a983b0c8ee40
flutter_bmfmap: 13f91b61ddc184c4fbfc12f3d75977aa64248e25 flutter_bmfmap: 57030919b16b5353649fbea77b6143129f7a4ff1
flutter_bmfutils: 4a3aec04ee00cf35d11e33027c485a7f7e9140d0 flutter_bmfutils: 41b6af33c5e7d5d5f841ef9087fbd271c05b1961
flutter_downloader: d7c6d679fbc9a65d9094db7d9d562ee7a155f22e flutter_downloader: 058b9c41564a90500f67f3e432e3524613a7fd83
flutter_drag_scale: 8db5da666c6fda0621291339c31dc45562312860 flutter_drag_scale: 545fd546a1e968bd965883f0511b1c47f049f37d
flutter_superplayer: b46df51c000f4ae28da52ba8e07d3bf094500327 flutter_superplayer: d776c28859e3e6c17821ab7973c1fd374f4f546f
fluttertoast: df9ba425182e58aa231106c563bffa08c0253471 fluttertoast: b644586ef3b16f67fae9a1f8754cef6b2d6b634b
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
geolocator: 4a05413b63345608ddfa46a9b2a584bc244d6c55 image_picker: 9c3312491f862b28d21ecd8fdf0ee14e601b3f09
image_picker: 1c50c15f268eac05df9884b7a57b157a7e5d7fb5
map_launcher: b429f5dc548985f011d7c840f269cd2ee3b5d45e
Masonry: 678fab65091a9290e40e2832a55e7ab731aad201 Masonry: 678fab65091a9290e40e2832a55e7ab731aad201
open_file: 898f23092cb034fda4ae3b268d782fe25d525e6b open_file: 02eb5cb6b21264bd3a696876f5afbfb7ca4f4b7d
package_info: cce50adca9873c79f931618469d2114b91d71189 package_info: 873975fc26034f0b863a300ad47e7f1ac6c7ec62
path_provider: 961ce7cdf0cba062c2f6ac640bcd96d310ec8645 path_provider: abfe2b5c733d04e238b0d8691db0cfd63a27a93c
permission_handler: a6eb0c0a10e733fc3e1dcea4e2d426beb7c91064 permission_handler: ccb20a9fad0ee9b1314a52b70b76b473c5f8dab0
SDWebImage: a7f831e1a65eb5e285e3fb046a23fcfbf08e696d SDWebImage: a7f831e1a65eb5e285e3fb046a23fcfbf08e696d
shared_preferences: 47eaded4d5dc0bb45e04e66ce0b93ce876aff8a1 shared_preferences: af6bfa751691cdc24be3045c43ec037377ada40d
sqflite: 954affaf2567c73cda074440299a625e3b2cbf8a sqflite: 6d358c025f5b867b29ed92fc697fd34924e11904
TXLiteAVSDK_Professional: 645670c9d1bbabb88e8dff998fb097a22fe71208 TXLiteAVSDK_Professional: 645670c9d1bbabb88e8dff998fb097a22fe71208
url_launcher: 57d0ad20ca4ccf92256bb343ea186dbcf76fc042 url_launcher: 6fef411d543ceb26efce54b05a0a40bfd74cbbef
webview_flutter: 2035f13e34d76c8126e9bb6b893a0c050b2999b8 webview_flutter: d2b4d6c66968ad042ad94cbb791f5b72b4678a96
PODFILE CHECKSUM: 568d83cfac207bd024fffa34866403436cf8f991 PODFILE CHECKSUM: 568d83cfac207bd024fffa34866403436cf8f991
COCOAPODS: 1.15.2 COCOAPODS: 1.11.3

@ -3,7 +3,7 @@
archiveVersion = 1; archiveVersion = 1;
classes = { classes = {
}; };
objectVersion = 54; objectVersion = 51;
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 = 20250527; CURRENT_PROJECT_VERSION = 20220416;
DEVELOPMENT_TEAM = 64SK828CZ2; DEVELOPMENT_TEAM = 64SK828CZ2;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "i386 arm64"; "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "i386 arm64";
@ -405,7 +405,7 @@
"$(inherited)", "$(inherited)",
"$(PROJECT_DIR)/Flutter", "$(PROJECT_DIR)/Flutter",
); );
MARKETING_VERSION = 1.6.5; MARKETING_VERSION = 1.4.25;
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 +533,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 = 20250527; CURRENT_PROJECT_VERSION = 20220416;
DEVELOPMENT_TEAM = 64SK828CZ2; DEVELOPMENT_TEAM = 64SK828CZ2;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "i386 arm64"; "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "i386 arm64";
@ -551,7 +551,7 @@
"$(inherited)", "$(inherited)",
"$(PROJECT_DIR)/Flutter", "$(PROJECT_DIR)/Flutter",
); );
MARKETING_VERSION = 1.6.5; MARKETING_VERSION = 1.4.25;
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 = "";
@ -572,7 +572,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 = 20250527; CURRENT_PROJECT_VERSION = 20220416;
DEVELOPMENT_TEAM = 64SK828CZ2; DEVELOPMENT_TEAM = 64SK828CZ2;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "i386 arm64"; "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "i386 arm64";
@ -590,7 +590,7 @@
"$(inherited)", "$(inherited)",
"$(PROJECT_DIR)/Flutter", "$(PROJECT_DIR)/Flutter",
); );
MARKETING_VERSION = 1.6.5; MARKETING_VERSION = 1.4.25;
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 = "";

@ -66,7 +66,6 @@ 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; //
@ -110,11 +109,6 @@ 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';
// images14便.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; //
@ -167,7 +161,6 @@ class UserInfo {
default: default:
break; break;
} }
print('official_seal = $official_seal'); // official_seal = .png
} }
// //

@ -7,6 +7,7 @@ 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;
@ -14,14 +15,18 @@ 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;
AudioPlayer playerVoiceRemind; AudioPlayer playerVoiceRemind;
@ -119,52 +124,6 @@ List listReviewed = [];
bool g_bVoiceRemind = false; // bool g_bVoiceRemind = false; //
int g_remindGap = 60; // 60S0 int g_remindGap = 60; // 60S0
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; //
// //
// // // //
@ -228,7 +187,6 @@ 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;
@ -929,7 +887,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 : 70)), SizedBox(height: ScreenUtil().setHeight(copyright_info.contains('\n') ? 25 : 90)),
Container( Container(
alignment: Alignment.center, alignment: Alignment.center,
child: Text(copyright_info, child: Text(copyright_info,

@ -2078,7 +2078,6 @@ 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']}',
))); )));

@ -1,50 +0,0 @@
//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";
}

@ -1,829 +0,0 @@
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*4801.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),
);
}
}

@ -1,244 +0,0 @@
//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退Appflutter 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;
}
}

@ -1,27 +0,0 @@
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;
}
}

@ -1,14 +0,0 @@
// 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

@ -1,15 +0,0 @@
#!/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"

@ -1,17 +0,0 @@
//
// 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 */

@ -1,26 +0,0 @@
//
// 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=/Users/mlch911/Library/Android/sdk sdk.dir=S:\\Android\\Android-SDK-Windows
flutter.sdk=/Users/mlch911/fvm/versions/1.22.6 flutter.sdk=R:\\Flutter\\FlutterSDK\\1.22.6

@ -1,14 +0,0 @@
// 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

@ -1,15 +0,0 @@
#!/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,10 +398,7 @@ public class SuperPlayerImpl implements SuperPlayer, ITXVodPlayListener, ITXLive
mCurrentPlayVideoURL = url; mCurrentPlayVideoURL = url;
if (mLivePlayer != null) { if (mLivePlayer != null) {
mLivePlayer.setPlayListener(this); mLivePlayer.setPlayListener(this);
// 由于腾讯播放器SDK在2022-10-11进行更新导致hyzp_ybqx项目编译出现下面报错。将下面文件 int result = mLivePlayer.startPlay(url, playType); // result返回值0 success; -1 empty url; -2 invalid url; -3 invalid playType;
//\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 {
@ -452,9 +449,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.startVodPlay(Uri.decode(newUri.toString())); ret = mVodPlayer.startPlay(Uri.decode(newUri.toString()));
} else { } else {
ret = mVodPlayer.startVodPlay(url); ret = mVodPlayer.startPlay(url);
} }
if (ret == 0) { if (ret == 0) {
@ -501,7 +498,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);
} }
/** /**
@ -733,7 +730,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);
} }
@ -808,7 +805,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) {
@ -859,7 +856,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.startVodPlay(quality.url); mVodPlayer.startPlay(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.dev" url: "https://pub.flutter-io.cn"
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.dev" url: "https://pub.flutter-io.cn"
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.dev" url: "https://pub.flutter-io.cn"
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.dev" url: "https://pub.flutter-io.cn"
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.dev" url: "https://pub.flutter-io.cn"
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.dev" url: "https://pub.flutter-io.cn"
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.dev" url: "https://pub.flutter-io.cn"
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.dev" url: "https://pub.flutter-io.cn"
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.dev" url: "https://pub.flutter-io.cn"
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.dev" url: "https://pub.flutter-io.cn"
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.dev" url: "https://pub.flutter-io.cn"
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.dev" url: "https://pub.flutter-io.cn"
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.dev" url: "https://pub.flutter-io.cn"
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.dev" url: "https://pub.flutter-io.cn"
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.dev" url: "https://pub.flutter-io.cn"
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.dev" url: "https://pub.flutter-io.cn"
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.dev" url: "https://pub.flutter-io.cn"
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.dev" url: "https://pub.flutter-io.cn"
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.dev" url: "https://pub.flutter-io.cn"
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.dev" url: "https://pub.flutter-io.cn"
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.dev" url: "https://pub.flutter-io.cn"
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.dev" url: "https://pub.flutter-io.cn"
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.dev" url: "https://pub.flutter-io.cn"
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.dev" url: "https://pub.flutter-io.cn"
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.dev" url: "https://pub.flutter-io.cn"
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.dev" url: "https://pub.flutter-io.cn"
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.dev" url: "https://pub.flutter-io.cn"
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.dev" url: "https://pub.flutter-io.cn"
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.dev" url: "https://pub.flutter-io.cn"
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.dev" url: "https://pub.flutter-io.cn"
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.dev" url: "https://pub.flutter-io.cn"
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.dev" url: "https://pub.flutter-io.cn"
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.dev" url: "https://pub.flutter-io.cn"
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.dev" url: "https://pub.flutter-io.cn"
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.dev" url: "https://pub.flutter-io.cn"
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.dev" url: "https://pub.flutter-io.cn"
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.dev" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "2.1.0-nullsafety.3" version: "2.1.0-nullsafety.3"
sdks: sdks:

@ -4,10 +4,8 @@ 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';
@ -22,11 +20,6 @@ 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;
@ -39,18 +32,9 @@ 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 -
@ -307,17 +291,8 @@ class _BasicMapState extends State<BasicMap> {
.push( .push(
PageRouteBuilder( PageRouteBuilder(
opaque: false, opaque: false,
pageBuilder: (context, animation, secondaryAnimation) => dwInfoDialog( pageBuilder: (context, animation, secondaryAnimation) =>
id: id, dwInfoDialog(id: id, dwIndex: dwIndex, title: title, content: content),
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,38 +1,21 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:geolocator/geolocator.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({ dwInfoDialog({@required this.id, this.title = "", @required this.dwIndex, this.content});
@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) {
getCurrentPosition();
Size mediaSize = MediaQuery.of(context).size; Size mediaSize = MediaQuery.of(context).size;
return WillPopScope( return WillPopScope(
child: Material( child: Material(
@ -107,9 +90,9 @@ class dwInfoDialog extends Dialog {
onPressed: () async { onPressed: () async {
ret = true; ret = true;
getingDwVideo = false; getingDwVideo = false;
navigationMap(context); Navigator.pop(context, ret); //sRet
}, },
child: Text("导航"), child: Text("确认"),
), ),
RaisedButton( RaisedButton(
child: Text("取消"), child: Text("取消"),
@ -132,102 +115,4 @@ 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 getCurrentPosition() 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;
}
}
}
await Geolocator.getCurrentPosition().then((Position value) {
originLatitude = value.latitude;
originLongitude = value.longitude;
print('value = ${value.toString()}');
// value = Latitude: 28.796201, Longitude: 104.607751
print('getCurrentPosition end');
});
}
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
}
} }

@ -1,49 +0,0 @@
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: Text(map.mapName),
leading: SvgPicture.asset(
map.icon,
height: 30.0,
width: 30.0,
),
),
],
),
),
),
),
],
),
);
},
);
}
}

@ -13,7 +13,6 @@ 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';
@ -76,8 +75,6 @@ class _LoginPageState extends State<TsjjContentNew> with SingleTickerProviderSta
try_setState(); // try_setState(); //
}); });
print('official_seal = $official_seal');
_widthLeft = _screenWidth / 2; _widthLeft = _screenWidth / 2;
getListFlields(); getListFlields();
@ -126,8 +123,7 @@ 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'])) await flustars.WidgetUtil.getImageWH(url: getMediaUrl(_mapGetTsjjGetData['pic_url'])).then((rect) {
.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");
@ -919,13 +915,8 @@ 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/" + official_seal), fit: BoxFit.contain), image: AssetImage("assets/images/jkzx_stamp.png"), fit: BoxFit.contain),
), ),
//child: //child:
), ),

@ -16,7 +16,6 @@ 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';
@ -203,13 +202,11 @@ 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', leadColor: _deepGreyColor, onTapFun: OnTap_Remind), leadPath: 'assets/images/语音提醒.png',
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)
@ -514,10 +511,6 @@ 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()));
} }

@ -1,284 +0,0 @@
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);
},
)
],
),
],
),
),
);
}
}

@ -1,739 +0,0 @@
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;
// 131112
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: () {
// 131112
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: () {
// 131112
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: () {
// 131112
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
// 131112
// 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;
// 131112
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);
}
//2List
// 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,43 +13,38 @@ 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 url;
String urlType;
int id;
String dwip; String dwip;
int loop; //1 0 String url;
String title; String title;
int loop; //1 0
int id;
@override @override
_SuperPlayerPageState createState() => _SuperPlayerPageState(); _SuperPlayerPageState createState() => _SuperPlayerPageState();
} }
class _SuperPlayerPageState extends State<SuperPlayerPage> class _SuperPlayerPageState extends State<SuperPlayerPage> with SuperPlayerListener {
with WidgetsBindingObserver, AutomaticKeepAliveClientMixin { final SuperPlayerController _playerController = SuperPlayerController();
// SuperPlayerController _playerController = SuperPlayerController(); final FijkPlayer _ijkPlayer = (){
var player = FijkPlayer();
@override player.setOption(FijkOption.playerCategory, "packet-buffering", 0);
// TODO: implement wantKeepAlive player.setOption(FijkOption.formatCategory, "probesize", 1024);
bool get wantKeepAlive => true; return player;
}();
final FijkPlayer _playerController = FijkPlayer();
String _sdkVersion = 'Unknown'; String _sdkVersion = 'Unknown';
List<String> _logs = []; List<String> _logs = [];
@ -60,127 +55,66 @@ class _SuperPlayerPageState extends State<SuperPlayerPage>
Playing = false; Playing = false;
// 131112 // 131112
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();
//initPlatformState(); init();
// 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();
} }
void startPlay() async { Future<void> init() async {
// await _playerController.addListener(() {}); await _playerController.addListener(this);
await initPlatformState();
if (!mounted) return; if (!mounted) return;
print('mounted = ${mounted}');
await _playerController.setLoop(widget.loop); // 012 if (_useIJKPlayer) {
await _playerController.setOption(FijkOption.playerCategory, "mediacodec-all-videos", 1); await _playerController.removeListener(this);
await _playerController.setOption(FijkOption.hostCategory, "enable-snapshot", 1); _ijkPlayer.addListener(_fijkValueListener);
await _playerController.setOption(FijkOption.hostCategory, "request-screen-on", 1); _ijkPlayer.setDataSource(widget.url, autoPlay: true);
await _playerController.setOption(FijkOption.hostCategory, "request-audio-focus", 1); } else {
await _playerController.setOption(FijkOption.hostCategory, "enable-accurate-seek", 1); await _playerController.uiHideDanmu();
// rmtp if (0 == widget.loop) {
if (widget.urlType != 'mp4') { await _playerController.setLoop(true);
/// fijkplayer-OK1 - Being }
// await _playerController.playWithModel(testSuperPlayerModel);
await _playerController.setOption(FijkOption.playerCategory, "packet-buffering", 0); }
// Size1024K1M,
// 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);
// rtmp1s
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);
} }
// Future<void> init() async { bool get _useIJKPlayer {
// await _playerController.addListener(this); return Platform.isIOS && widget.url.startsWith("rtmp");
// 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 {
// int appId = 1252463788; return SuperPlayerModel(url: widget.url);
// 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');
@ -194,20 +128,16 @@ class _SuperPlayerPageState extends State<SuperPlayerPage>
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();
// // List<Widget> listData = getDataListControl2(); double btnHeight1 = 70; //
// double btnHeight1 = 70; // double btnHeight2 = 160; //
// double btnHeight2 = 160; // int btnCount = 4; //
// int btnCount = 4; // // int btnCount3 = listData.length; //
// // int btnCount3 = listData.length; // var mediaSize = MediaQuery.of(context).size;
// 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; //
@ -217,7 +147,6 @@ class _SuperPlayerPageState extends State<SuperPlayerPage>
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
@ -228,13 +157,9 @@ class _SuperPlayerPageState extends State<SuperPlayerPage>
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,
@ -245,12 +170,6 @@ class _SuperPlayerPageState extends State<SuperPlayerPage>
], ],
), ),
), ),
// decoration: BoxDecoration(
// gradient: LinearGradient(colors: [
// Color(0xFF0018EB),
// Color(0xFF01C1D9),
// ], begin: Alignment.bottomCenter, end: Alignment.topCenter),
// ),
), ),
), ),
title: Padding( title: Padding(
@ -263,7 +182,7 @@ class _SuperPlayerPageState extends State<SuperPlayerPage>
iconData: Icons.chevron_left_outlined, iconData: Icons.chevron_left_outlined,
onPress: () { onPress: () {
getingDwVideo = false; getingDwVideo = false;
Navigator.pop(context); pop();
}, },
), ),
Expanded( Expanded(
@ -280,16 +199,12 @@ class _SuperPlayerPageState extends State<SuperPlayerPage>
), ),
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),
@ -297,30 +212,7 @@ class _SuperPlayerPageState extends State<SuperPlayerPage>
child: Stack( child: Stack(
children: [ children: [
_playState <= 2 ? getMoreWidget(strokeWidth: 3.0) : SizedBox.shrink(), _playState <= 2 ? getMoreWidget(strokeWidth: 3.0) : SizedBox.shrink(),
// SuperPlayerView( _useIJKPlayer ? FijkView(player: _ijkPlayer, color: Colors.black) : SuperPlayerView(controller: _playerController)
// 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),
], ],
), ),
), ),
@ -333,7 +225,6 @@ class _SuperPlayerPageState extends State<SuperPlayerPage>
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,
@ -486,41 +377,27 @@ class _SuperPlayerPageState extends State<SuperPlayerPage>
} }
}, },
), ),
// 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;
// 131112 // 131112
setSphericalCameraDio(id: widget.id, dwip: widget.dwip, cmdCode: 1); setSphericalCameraDio(id: widget.id, dwip: widget.dwip, cmdCode: 1);
Navigator.pop(context); // pop();
}, },
), ),
); );
} }
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', {});
@ -529,13 +406,14 @@ class _SuperPlayerPageState extends State<SuperPlayerPage>
@override @override
void onClickSmallReturnBtn() { void onClickSmallReturnBtn() {
_addLog('onClickSmallReturnBtn', {}); _addLog('onClickSmallReturnBtn', {});
Navigator.maybePop(context); pop();
} }
@override @override
void onFullScreenChange(bool isFullScreen) { void onFullScreenChange(bool isFullScreen) {
_addLog('onFullScreenChange', {'isFullScreen': isFullScreen}); _addLog('onFullScreenChange', {'isFullScreen': isFullScreen});
bFullScreen = !bFullScreen; if (bFullScreen == isFullScreen) return;
bFullScreen = isFullScreen;
setState(() {}); setState(() {});
} }
@ -574,6 +452,12 @@ class _SuperPlayerPageState extends State<SuperPlayerPage>
_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,
@ -632,13 +516,7 @@ class _SuperPlayerPageState extends State<SuperPlayerPage>
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)),
@ -654,26 +532,21 @@ class _SuperPlayerPageState extends State<SuperPlayerPage>
bool bPlaying = true; bool bPlaying = true;
void playOrPause() { Future<void> playOrPause() async {
// playerRegionProvide.changePlayerState(bPlaying);
//
// if (bPlaying) {
// _playerController.start();
// } else {
// _playerController.pause();
// }
//
// setState(() {
// bPlaying = !bPlaying;
// });
//state : 1 2 //state : 1 2
if (FijkState.started == _playerController.state) { int state;
if (_useIJKPlayer) {
state = _ijkPlayer.state == FijkState.started ? 1 : 2;
} else {
state = await _playerController.getPlayState();
}
if (1 == state) {
bPlaying = false; bPlaying = false;
_playerController.pause(); _useIJKPlayer ? _ijkPlayer.pause() : _playerController.pause();
} else { } else {
bPlaying = true; bPlaying = true;
_playerController.start(); _useIJKPlayer ? _ijkPlayer.start() : _playerController.resume();
} }
playerRegionProvide.changePlayerState(bPlaying); playerRegionProvide.changePlayerState(bPlaying);
Storage.setString('bPlaying', bPlaying ? 'true' : 'false'); Storage.setString('bPlaying', bPlaying ? 'true' : 'false');
@ -683,30 +556,13 @@ class _SuperPlayerPageState extends State<SuperPlayerPage>
void restartPlay(String url) async { void restartPlay(String url) async {
_playState = 4; _playState = 4;
bPlaying = true; bPlaying = true;
if (_useIJKPlayer) {
await _playerController.stop(); await _ijkPlayer.reset();
await _playerController.reset(); _ijkPlayer.setDataSource(widget.url, autoPlay: true);
startPlay(); } else {
_playerController.resetPlayer();
// _playerController.resetPlayer(); _playerController.resume();
// _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);
} }
//2List //2List

@ -356,13 +356,6 @@ 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:
@ -394,27 +387,6 @@ packages:
url: "https://pub.flutter-io.cn" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "4.0.1" version: "4.0.1"
geolocator:
dependency: "direct main"
description:
name: geolocator
url: "https://pub.flutter-io.cn"
source: hosted
version: "6.2.1"
geolocator_platform_interface:
dependency: transitive
description:
name: geolocator_platform_interface
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.0.9"
geolocator_web:
dependency: transitive
description:
name: geolocator_web
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.0.1"
get_it: get_it:
dependency: "direct main" dependency: "direct main"
description: description:
@ -485,13 +457,6 @@ 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:
name: map_launcher
url: "https://pub.flutter-io.cn"
source: hosted
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.6.5+20250527 version: 1.4.33+20220515
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.8 fijkplayer: ^0.8.7
path_provider: ^1.6.14 path_provider: ^1.6.14
permission_handler: ^5.0.1+1 permission_handler: ^5.0.1+1
@ -108,11 +108,6 @@ dependencies:
# 添加水印插件 # 添加水印插件
disable_screenshots: ^0.1.0 disable_screenshots: ^0.1.0
# 导航相关插件
map_launcher: ^1.1.3+1
flutter_svg: ^0.19.1
geolocator: ^6.2.1
dev_dependencies: dev_dependencies:
flutter_test: flutter_test:
sdk: flutter sdk: flutter

Loading…
Cancel
Save