mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
opt: pm share
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -630,18 +630,21 @@ class _ArticlePageState extends State<ArticlePage>
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
PageUtils.pmShare(
|
if (mounted) {
|
||||||
content: {
|
PageUtils.pmShare(
|
||||||
"id": _articleCtr.commentId,
|
this.context,
|
||||||
"title": "- 哔哩哔哩专栏",
|
content: {
|
||||||
"headline": _articleCtr.summary.title!, // throw
|
"id": _articleCtr.commentId,
|
||||||
"source": 6,
|
"title": "- 哔哩哔哩专栏",
|
||||||
"thumb": _articleCtr.summary.cover!,
|
"headline": _articleCtr.summary.title!, // throw
|
||||||
"author": _articleCtr.summary.author!.name,
|
"source": 6,
|
||||||
"author_id":
|
"thumb": _articleCtr.summary.cover!,
|
||||||
_articleCtr.summary.author!.mid.toString(),
|
"author": _articleCtr.summary.author!.name,
|
||||||
},
|
"author_id":
|
||||||
);
|
_articleCtr.summary.author!.mid.toString(),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
SmartDialog.showToast(e.toString());
|
SmartDialog.showToast(e.toString());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -256,7 +256,7 @@ class BangumiIntroController
|
|||||||
Future actionShareVideo(context) async {
|
Future actionShareVideo(context) async {
|
||||||
showDialog(
|
showDialog(
|
||||||
context: context,
|
context: context,
|
||||||
builder: (context) {
|
builder: (_) {
|
||||||
String videoUrl = '${HttpString.baseUrl}/video/$bvid';
|
String videoUrl = '${HttpString.baseUrl}/video/$bvid';
|
||||||
return AlertDialog(
|
return AlertDialog(
|
||||||
clipBehavior: Clip.hardEdge,
|
clipBehavior: Clip.hardEdge,
|
||||||
@@ -351,6 +351,7 @@ class BangumiIntroController
|
|||||||
.firstWhere((item) => item.epId == epId);
|
.firstWhere((item) => item.epId == epId);
|
||||||
final title = '${bangumiItem!.title!} ${item.showTitle}';
|
final title = '${bangumiItem!.title!} ${item.showTitle}';
|
||||||
PageUtils.pmShare(
|
PageUtils.pmShare(
|
||||||
|
context,
|
||||||
content: {
|
content: {
|
||||||
"id": epId!.toString(),
|
"id": epId!.toString(),
|
||||||
"title": title,
|
"title": title,
|
||||||
|
|||||||
@@ -240,10 +240,10 @@ class AuthorPanel extends StatelessWidget {
|
|||||||
constraints: BoxConstraints(
|
constraints: BoxConstraints(
|
||||||
maxWidth: min(640, min(Get.width, Get.height)),
|
maxWidth: min(640, min(Get.width, Get.height)),
|
||||||
),
|
),
|
||||||
builder: (context) {
|
builder: (context1) {
|
||||||
return Padding(
|
return Padding(
|
||||||
padding:
|
padding:
|
||||||
EdgeInsets.only(bottom: MediaQuery.of(context).padding.bottom),
|
EdgeInsets.only(bottom: MediaQuery.of(context1).padding.bottom),
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
@@ -338,6 +338,7 @@ class AuthorPanel extends StatelessWidget {
|
|||||||
: item.modules.moduleDynamic!.major!.opus!.pics!.first
|
: item.modules.moduleDynamic!.major!.opus!.pics!.first
|
||||||
.url!;
|
.url!;
|
||||||
PageUtils.pmShare(
|
PageUtils.pmShare(
|
||||||
|
context,
|
||||||
content: {
|
content: {
|
||||||
"id": id,
|
"id": id,
|
||||||
"title": title,
|
"title": title,
|
||||||
|
|||||||
@@ -454,6 +454,7 @@ class _LiveRoomPageState extends State<LiveRoomPage>
|
|||||||
onTap: () {
|
onTap: () {
|
||||||
try {
|
try {
|
||||||
PageUtils.pmShare(
|
PageUtils.pmShare(
|
||||||
|
this.context,
|
||||||
content: {
|
content: {
|
||||||
"cover": _liveRoomController
|
"cover": _liveRoomController
|
||||||
.roomInfoH5.value.roomInfo!.cover!,
|
.roomInfoH5.value.roomInfo!.cover!,
|
||||||
|
|||||||
@@ -435,7 +435,7 @@ class VideoIntroController extends GetxController {
|
|||||||
Future actionShareVideo(context) async {
|
Future actionShareVideo(context) async {
|
||||||
showDialog(
|
showDialog(
|
||||||
context: context,
|
context: context,
|
||||||
builder: (context) {
|
builder: (_) {
|
||||||
String videoUrl = '${HttpString.baseUrl}/video/$bvid';
|
String videoUrl = '${HttpString.baseUrl}/video/$bvid';
|
||||||
return AlertDialog(
|
return AlertDialog(
|
||||||
clipBehavior: Clip.hardEdge,
|
clipBehavior: Clip.hardEdge,
|
||||||
@@ -510,6 +510,7 @@ class VideoIntroController extends GetxController {
|
|||||||
Get.back();
|
Get.back();
|
||||||
try {
|
try {
|
||||||
PageUtils.pmShare(
|
PageUtils.pmShare(
|
||||||
|
context,
|
||||||
content: {
|
content: {
|
||||||
"id": videoDetail.value.aid!.toString(),
|
"id": videoDetail.value.aid!.toString(),
|
||||||
"title": videoDetail.value.title!,
|
"title": videoDetail.value.title!,
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ import 'package:get/get.dart';
|
|||||||
import 'package:url_launcher/url_launcher.dart';
|
import 'package:url_launcher/url_launcher.dart';
|
||||||
|
|
||||||
class PageUtils {
|
class PageUtils {
|
||||||
static void pmShare({required Map content}) async {
|
static void pmShare(BuildContext context, {required Map content}) async {
|
||||||
// debugPrint(content.toString());
|
// debugPrint(content.toString());
|
||||||
|
|
||||||
List<UserModel> userList = <UserModel>[];
|
List<UserModel> userList = <UserModel>[];
|
||||||
@@ -54,16 +54,18 @@ class PageUtils {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
showModalBottomSheet(
|
if (context.mounted) {
|
||||||
context: Get.context!,
|
showModalBottomSheet(
|
||||||
builder: (context) => SharePanel(
|
context: context,
|
||||||
content: content,
|
builder: (context) => SharePanel(
|
||||||
userList: userList,
|
content: content,
|
||||||
),
|
userList: userList,
|
||||||
useSafeArea: true,
|
),
|
||||||
enableDrag: false,
|
useSafeArea: true,
|
||||||
isScrollControlled: true,
|
enableDrag: false,
|
||||||
);
|
isScrollControlled: true,
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void scheduleExit(BuildContext context, isFullScreen,
|
static void scheduleExit(BuildContext context, isFullScreen,
|
||||||
|
|||||||
Reference in New Issue
Block a user