opt: video dialog

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-03-10 23:56:51 +08:00
parent 33375aeb7d
commit bd39de2109
5 changed files with 10 additions and 9 deletions

View File

@@ -15,7 +15,7 @@ void imageSaveDialog({
final double imgWidth = min(Get.width, Get.height) - 8 * 2;
SmartDialog.show(
animationType: SmartAnimationType.centerScale_otherSlide,
builder: (context) => Container(
builder: (_) => Container(
width: imgWidth,
margin: const EdgeInsets.symmetric(horizontal: StyleString.safeSpace),
decoration: BoxDecoration(

View File

@@ -357,9 +357,9 @@ class BangumiIntroController extends CommonController {
}
// 分享视频
Future actionShareVideo() async {
Future actionShareVideo(context) async {
showDialog(
context: Get.context!,
context: context,
builder: (context) {
String videoUrl = '${HttpString.baseUrl}/video/$bvid';
return AlertDialog(

View File

@@ -522,7 +522,8 @@ class _BangumiInfoState extends State<BangumiInfo>
),
ActionItem(
icon: const Icon(FontAwesomeIcons.shareFromSquare),
onTap: () => bangumiIntroController.actionShareVideo(),
onTap: () =>
bangumiIntroController.actionShareVideo(context),
selectStatus: false,
loadingStatus: false,
semanticsLabel: '转发',
@@ -595,7 +596,7 @@ class _BangumiInfoState extends State<BangumiInfo>
const SizedBox(width: 8),
ActionRowItem(
icon: const Icon(FontAwesomeIcons.share),
onTap: () => bangumiIntroController.actionShareVideo(),
onTap: () => bangumiIntroController.actionShareVideo(context),
selectStatus: false,
loadingStatus: widget.isLoading,
text: '转发'),

View File

@@ -469,9 +469,9 @@ class VideoIntroController extends GetxController
}
// 分享视频
Future actionShareVideo() async {
Future actionShareVideo(context) async {
showDialog(
context: Get.context!,
context: context,
builder: (context) {
String videoUrl = '${HttpString.baseUrl}/video/$bvid';
return AlertDialog(

View File

@@ -934,7 +934,7 @@ class _VideoInfoState extends State<VideoInfo> with TickerProviderStateMixin {
),
ActionItem(
icon: const Icon(FontAwesomeIcons.shareFromSquare),
onTap: () => videoIntroController.actionShareVideo(),
onTap: () => videoIntroController.actionShareVideo(context),
selectStatus: false,
loadingStatus: widget.loadingStatus,
semanticsLabel: '分享',
@@ -1002,7 +1002,7 @@ class _VideoInfoState extends State<VideoInfo> with TickerProviderStateMixin {
const SizedBox(width: 8),
ActionRowItem(
icon: const Icon(FontAwesomeIcons.share),
onTap: () => videoIntroController.actionShareVideo(),
onTap: () => videoIntroController.actionShareVideo(context),
selectStatus: false,
loadingStatus: widget.loadingStatus,
// text: !loadingStatus