mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-29 12:38:34 +00:00
@@ -135,8 +135,12 @@ class _ReplyPageState extends CommonRichTextPubPageState<ReplyPage> {
|
||||
List<Widget> buildInputView() {
|
||||
return [
|
||||
Padding(
|
||||
padding:
|
||||
const EdgeInsets.only(top: 12, right: 15, left: 15, bottom: 10),
|
||||
padding: const EdgeInsets.only(
|
||||
top: 12,
|
||||
right: 15,
|
||||
left: 15,
|
||||
bottom: 10,
|
||||
),
|
||||
child: Form(
|
||||
autovalidateMode: AutovalidateMode.onUserInteraction,
|
||||
child: Listener(
|
||||
@@ -234,8 +238,10 @@ class _ReplyPageState extends CommonRichTextPubPageState<ReplyPage> {
|
||||
onPressed: enablePublish.value ? onPublish : null,
|
||||
style: FilledButton.styleFrom(
|
||||
tapTargetSize: MaterialTapTargetSize.shrinkWrap,
|
||||
padding:
|
||||
const EdgeInsets.symmetric(horizontal: 20, vertical: 10),
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 20,
|
||||
vertical: 10,
|
||||
),
|
||||
visualDensity: VisualDensity.compact,
|
||||
),
|
||||
child: const Text('发送'),
|
||||
@@ -243,7 +249,7 @@ class _ReplyPageState extends CommonRichTextPubPageState<ReplyPage> {
|
||||
),
|
||||
],
|
||||
),
|
||||
)
|
||||
),
|
||||
];
|
||||
}
|
||||
|
||||
@@ -305,7 +311,8 @@ class _ReplyPageState extends CommonRichTextPubPageState<ReplyPage> {
|
||||
onTap: () async {
|
||||
controller.keepChatPanel();
|
||||
({String title, String url})? res = await Get.to(
|
||||
ReplySearchPage(type: widget.replyType, oid: widget.oid));
|
||||
ReplySearchPage(type: widget.replyType, oid: widget.oid),
|
||||
);
|
||||
if (res != null) {
|
||||
onInsertText(
|
||||
'${res.title} ',
|
||||
@@ -336,8 +343,9 @@ class _ReplyPageState extends CommonRichTextPubPageState<ReplyPage> {
|
||||
item(
|
||||
onTap: () {
|
||||
try {
|
||||
final plPlayerController =
|
||||
Get.find<VideoDetailController>(tag: heroTag);
|
||||
final plPlayerController = Get.find<VideoDetailController>(
|
||||
tag: heroTag,
|
||||
);
|
||||
onInsertText(
|
||||
' ${DurationUtil.formatDuration((plPlayerController.playedTime ?? Duration.zero).inSeconds)} ',
|
||||
RichTextType.common,
|
||||
@@ -357,15 +365,18 @@ class _ReplyPageState extends CommonRichTextPubPageState<ReplyPage> {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
final plPlayerController =
|
||||
Get.find<VideoDetailController>(tag: heroTag);
|
||||
final plPlayerController = Get.find<VideoDetailController>(
|
||||
tag: heroTag,
|
||||
);
|
||||
final res = await plPlayerController
|
||||
.plPlayerController.videoPlayerController
|
||||
.plPlayerController
|
||||
.videoPlayerController
|
||||
?.screenshot(format: 'image/png');
|
||||
if (res != null) {
|
||||
final tempDir = await getTemporaryDirectory();
|
||||
File file = File(
|
||||
'${tempDir.path}/${Utils.generateRandomString(8)}.png');
|
||||
'${tempDir.path}/${Utils.generateRandomString(8)}.png',
|
||||
);
|
||||
await file.writeAsBytes(res);
|
||||
pathList.add(file.path);
|
||||
} else {
|
||||
@@ -375,8 +386,11 @@ class _ReplyPageState extends CommonRichTextPubPageState<ReplyPage> {
|
||||
debugPrint(e.toString());
|
||||
}
|
||||
},
|
||||
icon: Icon(Icons.enhance_photo_translate_outlined,
|
||||
size: 28, color: color),
|
||||
icon: Icon(
|
||||
Icons.enhance_photo_translate_outlined,
|
||||
size: 28,
|
||||
color: color,
|
||||
),
|
||||
title: '视频截图',
|
||||
),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user