mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-08-05 18:20:10 +08:00
upgrade dep
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -124,7 +124,7 @@ class _LiveRoomPageState extends State<LiveRoomPage>
|
|||||||
videoPlayerServiceHandler.onVideoDetailDispose(heroTag);
|
videoPlayerServiceHandler.onVideoDetailDispose(heroTag);
|
||||||
_listener?.cancel();
|
_listener?.cancel();
|
||||||
WidgetsBinding.instance.removeObserver(this);
|
WidgetsBinding.instance.removeObserver(this);
|
||||||
ScreenBrightness().resetApplicationScreenBrightness();
|
ScreenBrightness.instance.resetApplicationScreenBrightness();
|
||||||
PlPlayerController.setPlayCallBack(null);
|
PlPlayerController.setPlayCallBack(null);
|
||||||
_liveRoomController
|
_liveRoomController
|
||||||
..msgStream?.close()
|
..msgStream?.close()
|
||||||
|
|||||||
@@ -243,17 +243,19 @@ class _SavePanelState extends State<SavePanel> {
|
|||||||
if (isShare) {
|
if (isShare) {
|
||||||
Get.back();
|
Get.back();
|
||||||
SmartDialog.dismiss();
|
SmartDialog.dismiss();
|
||||||
Share.shareXFiles(
|
SharePlus.instance.share(
|
||||||
[
|
ShareParams(
|
||||||
XFile.fromData(
|
files: [
|
||||||
pngBytes,
|
XFile.fromData(
|
||||||
name: picName,
|
pngBytes,
|
||||||
mimeType: 'image/png',
|
name: picName,
|
||||||
),
|
mimeType: 'image/png',
|
||||||
],
|
),
|
||||||
sharePositionOrigin: await Utils.isIpad()
|
],
|
||||||
? Rect.fromLTWH(0, 0, Get.width, Get.height / 2)
|
sharePositionOrigin: await Utils.isIpad()
|
||||||
: null,
|
? Rect.fromLTWH(0, 0, Get.width, Get.height / 2)
|
||||||
|
: null,
|
||||||
|
),
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
final result = await SaverGallery.saveImage(
|
final result = await SaverGallery.saveImage(
|
||||||
|
|||||||
@@ -325,7 +325,7 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
|||||||
|
|
||||||
WidgetsBinding.instance.removeObserver(this);
|
WidgetsBinding.instance.removeObserver(this);
|
||||||
if (!Get.previousRoute.startsWith('/video')) {
|
if (!Get.previousRoute.startsWith('/video')) {
|
||||||
ScreenBrightness().resetApplicationScreenBrightness();
|
ScreenBrightness.instance.resetApplicationScreenBrightness();
|
||||||
PlPlayerController.setPlayCallBack(null);
|
PlPlayerController.setPlayCallBack(null);
|
||||||
}
|
}
|
||||||
videoDetailController.positionSubscription?.cancel();
|
videoDetailController.positionSubscription?.cancel();
|
||||||
@@ -361,7 +361,7 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
|||||||
|
|
||||||
WidgetsBinding.instance.removeObserver(this);
|
WidgetsBinding.instance.removeObserver(this);
|
||||||
|
|
||||||
ScreenBrightness().resetApplicationScreenBrightness();
|
ScreenBrightness.instance.resetApplicationScreenBrightness();
|
||||||
|
|
||||||
videoDetailController.positionSubscription?.cancel();
|
videoDetailController.positionSubscription?.cancel();
|
||||||
videoIntroController.canelTimer();
|
videoIntroController.canelTimer();
|
||||||
@@ -405,14 +405,14 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
|||||||
videoDetailController.brightness!,
|
videoDetailController.brightness!,
|
||||||
);
|
);
|
||||||
if (videoDetailController.brightness != -1.0) {
|
if (videoDetailController.brightness != -1.0) {
|
||||||
ScreenBrightness().setApplicationScreenBrightness(
|
ScreenBrightness.instance.setApplicationScreenBrightness(
|
||||||
videoDetailController.brightness!,
|
videoDetailController.brightness!,
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
ScreenBrightness().resetApplicationScreenBrightness();
|
ScreenBrightness.instance.resetApplicationScreenBrightness();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
ScreenBrightness().resetApplicationScreenBrightness();
|
ScreenBrightness.instance.resetApplicationScreenBrightness();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
super.didPopNext();
|
super.didPopNext();
|
||||||
|
|||||||
@@ -888,22 +888,24 @@ class HeaderControlState extends State<HeaderControl> {
|
|||||||
SmartDialog.showToast('已保存');
|
SmartDialog.showToast('已保存');
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
Share.shareXFiles(
|
SharePlus.instance.share(
|
||||||
[
|
ShareParams(
|
||||||
XFile.fromData(
|
files: [
|
||||||
res.data,
|
XFile.fromData(
|
||||||
name: name,
|
res.data,
|
||||||
mimeType: 'application/json',
|
name: name,
|
||||||
),
|
mimeType: 'text/plain',
|
||||||
],
|
),
|
||||||
sharePositionOrigin: await Utils.isIpad()
|
],
|
||||||
? Rect.fromLTWH(
|
sharePositionOrigin: await Utils.isIpad()
|
||||||
0,
|
? Rect.fromLTWH(
|
||||||
0,
|
0,
|
||||||
Get.width,
|
0,
|
||||||
Get.height / 2,
|
Get.width,
|
||||||
)
|
Get.height / 2,
|
||||||
: null,
|
)
|
||||||
|
: null,
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1230,7 +1230,7 @@ class PlPlayerController {
|
|||||||
/// 亮度
|
/// 亮度
|
||||||
Future<void> getCurrentBrightness() async {
|
Future<void> getCurrentBrightness() async {
|
||||||
try {
|
try {
|
||||||
_currentBrightness.value = await ScreenBrightness().application;
|
_currentBrightness.value = await ScreenBrightness.instance.application;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
throw 'Failed to get current brightness';
|
throw 'Failed to get current brightness';
|
||||||
//return 0;
|
//return 0;
|
||||||
@@ -1244,7 +1244,7 @@ class PlPlayerController {
|
|||||||
Future<void> setBrightness(double brightness) async {
|
Future<void> setBrightness(double brightness) async {
|
||||||
try {
|
try {
|
||||||
this.brightness.value = brightness;
|
this.brightness.value = brightness;
|
||||||
ScreenBrightness().setApplicationScreenBrightness(brightness);
|
ScreenBrightness.instance.setApplicationScreenBrightness(brightness);
|
||||||
// setVideoBrightness();
|
// setVideoBrightness();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
throw 'Failed to set brightness';
|
throw 'Failed to set brightness';
|
||||||
|
|||||||
@@ -194,8 +194,10 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
|
|||||||
|
|
||||||
Future.microtask(() async {
|
Future.microtask(() async {
|
||||||
try {
|
try {
|
||||||
_brightnessValue.value = await ScreenBrightness().application;
|
_brightnessValue.value = await ScreenBrightness.instance.application;
|
||||||
_listener = ScreenBrightness().onApplicationScreenBrightnessChanged
|
_listener = ScreenBrightness
|
||||||
|
.instance
|
||||||
|
.onApplicationScreenBrightnessChanged
|
||||||
.listen((double value) {
|
.listen((double value) {
|
||||||
if (mounted) {
|
if (mounted) {
|
||||||
_brightnessValue.value = value;
|
_brightnessValue.value = value;
|
||||||
@@ -224,7 +226,7 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
|
|||||||
|
|
||||||
Future<void> setBrightness(double value) async {
|
Future<void> setBrightness(double value) async {
|
||||||
try {
|
try {
|
||||||
await ScreenBrightness().setApplicationScreenBrightness(value);
|
await ScreenBrightness.instance.setApplicationScreenBrightness(value);
|
||||||
} catch (_) {}
|
} catch (_) {}
|
||||||
_brightnessIndicator.value = true;
|
_brightnessIndicator.value = true;
|
||||||
_brightnessTimer?.cancel();
|
_brightnessTimer?.cancel();
|
||||||
|
|||||||
@@ -33,15 +33,13 @@ class ImageUtil {
|
|||||||
var path = '${temp.path}/$name';
|
var path = '${temp.path}/$name';
|
||||||
File(path).writeAsBytesSync(response.data);
|
File(path).writeAsBytesSync(response.data);
|
||||||
|
|
||||||
Rect? sharePositionOrigin;
|
SharePlus.instance.share(
|
||||||
if (await Utils.isIpad()) {
|
ShareParams(
|
||||||
sharePositionOrigin = Rect.fromLTWH(0, 0, Get.width, Get.height / 2);
|
files: [XFile(path)],
|
||||||
}
|
sharePositionOrigin: await Utils.isIpad()
|
||||||
|
? Rect.fromLTWH(0, 0, Get.width, Get.height / 2)
|
||||||
Share.shareXFiles(
|
: null,
|
||||||
[XFile(path)],
|
),
|
||||||
subject: url,
|
|
||||||
sharePositionOrigin: sharePositionOrigin,
|
|
||||||
);
|
);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
SmartDialog.showToast(e.toString());
|
SmartDialog.showToast(e.toString());
|
||||||
|
|||||||
@@ -42,13 +42,13 @@ class Utils {
|
|||||||
|
|
||||||
static Future<void> shareText(String text) async {
|
static Future<void> shareText(String text) async {
|
||||||
try {
|
try {
|
||||||
Rect? sharePositionOrigin;
|
SharePlus.instance.share(
|
||||||
if (await isIpad()) {
|
ShareParams(
|
||||||
sharePositionOrigin = Rect.fromLTWH(0, 0, Get.width, Get.height / 2);
|
text: text,
|
||||||
}
|
sharePositionOrigin: await Utils.isIpad()
|
||||||
Share.share(
|
? Rect.fromLTWH(0, 0, Get.width, Get.height / 2)
|
||||||
text,
|
: null,
|
||||||
sharePositionOrigin: sharePositionOrigin,
|
),
|
||||||
);
|
);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
SmartDialog.showToast(e.toString());
|
SmartDialog.showToast(e.toString());
|
||||||
|
|||||||
15
pubspec.lock
15
pubspec.lock
@@ -1605,20 +1605,19 @@ packages:
|
|||||||
share_plus:
|
share_plus:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
path: "packages/share_plus/share_plus"
|
name: share_plus
|
||||||
ref: main
|
sha256: b2961506569e28948d75ec346c28775bb111986bb69dc6a20754a457e3d97fa0
|
||||||
resolved-ref: cad093514b4247c2103a803ed951a572319454e4
|
url: "https://pub.dev"
|
||||||
url: "https://github.com/bggRGjQaUbCoE/plus_plugins.git"
|
source: hosted
|
||||||
source: git
|
version: "11.0.0"
|
||||||
version: "10.1.0"
|
|
||||||
share_plus_platform_interface:
|
share_plus_platform_interface:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: share_plus_platform_interface
|
name: share_plus_platform_interface
|
||||||
sha256: cc012a23fc2d479854e6c80150696c4a5f5bb62cb89af4de1c505cf78d0a5d0b
|
sha256: "1032d392bc5d2095a77447a805aa3f804d2ae6a4d5eef5e6ebb3bd94c1bc19ef"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "5.0.2"
|
version: "6.0.0"
|
||||||
shared_preferences:
|
shared_preferences:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|||||||
@@ -67,12 +67,7 @@ dependencies:
|
|||||||
# 权限
|
# 权限
|
||||||
permission_handler: ^12.0.0+1
|
permission_handler: ^12.0.0+1
|
||||||
# 分享
|
# 分享
|
||||||
# share_plus: ^10.0.2
|
share_plus: ^11.0.0
|
||||||
share_plus:
|
|
||||||
git:
|
|
||||||
url: https://github.com/bggRGjQaUbCoE/plus_plugins.git
|
|
||||||
ref: main
|
|
||||||
path: packages/share_plus/share_plus
|
|
||||||
# cookie 管理
|
# cookie 管理
|
||||||
# webview_cookie_manager: ^2.0.6
|
# webview_cookie_manager: ^2.0.6
|
||||||
# 浏览器
|
# 浏览器
|
||||||
|
|||||||
Reference in New Issue
Block a user