mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
opt: video sheet
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -84,7 +84,11 @@ void imageSaveDialog({
|
|||||||
SmartDialog.dismiss();
|
SmartDialog.dismiss();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
icon: const Icon(Icons.download, size: 20),
|
icon: Icon(
|
||||||
|
Icons.download,
|
||||||
|
size: 20,
|
||||||
|
color: Theme.of(context).colorScheme.onSurfaceVariant,
|
||||||
|
),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import 'package:PiliPlus/common/widgets/segment_progress_bar.dart';
|
|||||||
import 'package:PiliPlus/http/init.dart';
|
import 'package:PiliPlus/http/init.dart';
|
||||||
import 'package:PiliPlus/http/loading_state.dart';
|
import 'package:PiliPlus/http/loading_state.dart';
|
||||||
import 'package:PiliPlus/http/user.dart';
|
import 'package:PiliPlus/http/user.dart';
|
||||||
|
import 'package:PiliPlus/main.dart';
|
||||||
import 'package:PiliPlus/models/common/sponsor_block/action_type.dart';
|
import 'package:PiliPlus/models/common/sponsor_block/action_type.dart';
|
||||||
import 'package:PiliPlus/models/common/sponsor_block/post_segment_model.dart';
|
import 'package:PiliPlus/models/common/sponsor_block/post_segment_model.dart';
|
||||||
import 'package:PiliPlus/models/common/sponsor_block/segment_model.dart';
|
import 'package:PiliPlus/models/common/sponsor_block/segment_model.dart';
|
||||||
@@ -1331,11 +1332,21 @@ class VideoDetailController extends GetxController
|
|||||||
}
|
}
|
||||||
if (plPlayerController.isFullScreen.value) {
|
if (plPlayerController.isFullScreen.value) {
|
||||||
Utils.showFSSheet(
|
Utils.showFSSheet(
|
||||||
|
context,
|
||||||
|
child: plPlayerController.darkVideoPage && MyApp.darkThemeData != null
|
||||||
|
? Theme(
|
||||||
|
data: MyApp.darkThemeData!,
|
||||||
child: PostPanel(
|
child: PostPanel(
|
||||||
enableSlide: false,
|
enableSlide: false,
|
||||||
videoDetailController: this,
|
videoDetailController: this,
|
||||||
plPlayerController: plPlayerController,
|
plPlayerController: plPlayerController,
|
||||||
),
|
),
|
||||||
|
)
|
||||||
|
: PostPanel(
|
||||||
|
enableSlide: false,
|
||||||
|
videoDetailController: this,
|
||||||
|
plPlayerController: plPlayerController,
|
||||||
|
),
|
||||||
isFullScreen: () => plPlayerController.isFullScreen.value,
|
isFullScreen: () => plPlayerController.isFullScreen.value,
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
@@ -1597,10 +1608,19 @@ class VideoDetailController extends GetxController
|
|||||||
void showNoteList(BuildContext context) async {
|
void showNoteList(BuildContext context) async {
|
||||||
if (plPlayerController.isFullScreen.value) {
|
if (plPlayerController.isFullScreen.value) {
|
||||||
Utils.showFSSheet(
|
Utils.showFSSheet(
|
||||||
|
context,
|
||||||
|
child: plPlayerController.darkVideoPage && MyApp.darkThemeData != null
|
||||||
|
? Theme(
|
||||||
|
data: MyApp.darkThemeData!,
|
||||||
child: NoteListPage(
|
child: NoteListPage(
|
||||||
oid: oid.value,
|
oid: oid.value,
|
||||||
enableSlide: false,
|
enableSlide: false,
|
||||||
),
|
),
|
||||||
|
)
|
||||||
|
: NoteListPage(
|
||||||
|
oid: oid.value,
|
||||||
|
enableSlide: false,
|
||||||
|
),
|
||||||
isFullScreen: () => plPlayerController.isFullScreen.value,
|
isFullScreen: () => plPlayerController.isFullScreen.value,
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -1813,7 +1813,11 @@ class _VideoDetailPageState extends State<VideoDetailPage>
|
|||||||
);
|
);
|
||||||
if (isFullScreen) {
|
if (isFullScreen) {
|
||||||
Utils.showFSSheet(
|
Utils.showFSSheet(
|
||||||
|
context,
|
||||||
|
child: Theme(
|
||||||
|
data: themeData,
|
||||||
child: listSheetContent(false),
|
child: listSheetContent(false),
|
||||||
|
),
|
||||||
isFullScreen: () => isFullScreen,
|
isFullScreen: () => isFullScreen,
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
@@ -1897,11 +1901,15 @@ class _VideoDetailPageState extends State<VideoDetailPage>
|
|||||||
void showViewPoints() {
|
void showViewPoints() {
|
||||||
if (isFullScreen) {
|
if (isFullScreen) {
|
||||||
Utils.showFSSheet(
|
Utils.showFSSheet(
|
||||||
|
context,
|
||||||
|
child: Theme(
|
||||||
|
data: themeData,
|
||||||
child: ViewPointsPage(
|
child: ViewPointsPage(
|
||||||
enableSlide: false,
|
enableSlide: false,
|
||||||
videoDetailController: videoDetailController,
|
videoDetailController: videoDetailController,
|
||||||
plPlayerController: plPlayerController,
|
plPlayerController: plPlayerController,
|
||||||
),
|
),
|
||||||
|
),
|
||||||
isFullScreen: () => isFullScreen,
|
isFullScreen: () => isFullScreen,
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -2217,7 +2217,11 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
|||||||
);
|
);
|
||||||
if (isFullScreen) {
|
if (isFullScreen) {
|
||||||
Utils.showFSSheet(
|
Utils.showFSSheet(
|
||||||
|
context,
|
||||||
|
child: Theme(
|
||||||
|
data: themeData,
|
||||||
child: listSheetContent(false),
|
child: listSheetContent(false),
|
||||||
|
),
|
||||||
isFullScreen: () => isFullScreen,
|
isFullScreen: () => isFullScreen,
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
@@ -2301,11 +2305,15 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
|||||||
void showViewPoints() {
|
void showViewPoints() {
|
||||||
if (isFullScreen) {
|
if (isFullScreen) {
|
||||||
Utils.showFSSheet(
|
Utils.showFSSheet(
|
||||||
|
context,
|
||||||
|
child: Theme(
|
||||||
|
data: themeData,
|
||||||
child: ViewPointsPage(
|
child: ViewPointsPage(
|
||||||
enableSlide: false,
|
enableSlide: false,
|
||||||
videoDetailController: videoDetailController,
|
videoDetailController: videoDetailController,
|
||||||
plPlayerController: plPlayerController,
|
plPlayerController: plPlayerController,
|
||||||
),
|
),
|
||||||
|
),
|
||||||
isFullScreen: () => isFullScreen,
|
isFullScreen: () => isFullScreen,
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -97,24 +97,21 @@ class _HeaderControlState extends State<HeaderControl> {
|
|||||||
/// 设置面板
|
/// 设置面板
|
||||||
void showSettingSheet() {
|
void showSettingSheet() {
|
||||||
Utils.showFSSheet(
|
Utils.showFSSheet(
|
||||||
|
context,
|
||||||
isFullScreen: () => isFullScreen,
|
isFullScreen: () => isFullScreen,
|
||||||
child: Builder(
|
child: Theme(
|
||||||
builder: (context) => Container(
|
data: Theme.of(context),
|
||||||
|
child: Container(
|
||||||
clipBehavior: Clip.hardEdge,
|
clipBehavior: Clip.hardEdge,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Theme.of(context).colorScheme.surface,
|
color: Theme.of(context).colorScheme.surface,
|
||||||
borderRadius: const BorderRadius.all(Radius.circular(12)),
|
borderRadius: const BorderRadius.all(Radius.circular(12)),
|
||||||
),
|
),
|
||||||
margin: EdgeInsets.only(
|
margin: const EdgeInsets.all(12),
|
||||||
left: 12,
|
|
||||||
top: 12,
|
|
||||||
right: 12,
|
|
||||||
bottom: 12 + MediaQuery.paddingOf(context).bottom,
|
|
||||||
),
|
|
||||||
child: Material(
|
child: Material(
|
||||||
color: Colors.transparent,
|
color: Colors.transparent,
|
||||||
child: ListView(
|
child: ListView(
|
||||||
padding: EdgeInsets.only(bottom: 0),
|
padding: EdgeInsets.zero,
|
||||||
children: [
|
children: [
|
||||||
const SizedBox(height: 14),
|
const SizedBox(height: 14),
|
||||||
// ListTile(
|
// ListTile(
|
||||||
@@ -564,24 +561,25 @@ class _HeaderControlState extends State<HeaderControl> {
|
|||||||
void scheduleExit() async {
|
void scheduleExit() async {
|
||||||
const List<int> scheduleTimeChoices = [0, 15, 30, 45, 60];
|
const List<int> scheduleTimeChoices = [0, 15, 30, 45, 60];
|
||||||
Utils.showFSSheet(
|
Utils.showFSSheet(
|
||||||
|
context,
|
||||||
isFullScreen: () => isFullScreen,
|
isFullScreen: () => isFullScreen,
|
||||||
child: StatefulBuilder(
|
child: StatefulBuilder(
|
||||||
builder: (context, setState) {
|
builder: (_, setState) {
|
||||||
return Container(
|
return Theme(
|
||||||
|
data: Theme.of(context),
|
||||||
|
child: Material(
|
||||||
|
color: Colors.transparent,
|
||||||
|
child: Container(
|
||||||
clipBehavior: Clip.hardEdge,
|
clipBehavior: Clip.hardEdge,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Theme.of(context).colorScheme.surface,
|
color: Theme.of(context).colorScheme.surface,
|
||||||
borderRadius: const BorderRadius.all(Radius.circular(12)),
|
borderRadius: const BorderRadius.all(Radius.circular(12)),
|
||||||
),
|
),
|
||||||
margin: EdgeInsets.only(
|
margin: const EdgeInsets.all(12),
|
||||||
left: 12,
|
|
||||||
top: 12,
|
|
||||||
right: 12,
|
|
||||||
bottom: 12 + MediaQuery.paddingOf(context).bottom,
|
|
||||||
),
|
|
||||||
padding: const EdgeInsets.only(left: 14, right: 14),
|
padding: const EdgeInsets.only(left: 14, right: 14),
|
||||||
child: ListView(
|
child: ListView(
|
||||||
padding: const EdgeInsets.symmetric(vertical: 0, horizontal: 20),
|
padding:
|
||||||
|
const EdgeInsets.symmetric(vertical: 0, horizontal: 20),
|
||||||
children: [
|
children: [
|
||||||
const SizedBox(height: 10),
|
const SizedBox(height: 10),
|
||||||
const Center(child: Text('定时关闭', style: titleStyle)),
|
const Center(child: Text('定时关闭', style: titleStyle)),
|
||||||
@@ -590,7 +588,8 @@ class _HeaderControlState extends State<HeaderControl> {
|
|||||||
...[
|
...[
|
||||||
...scheduleTimeChoices,
|
...scheduleTimeChoices,
|
||||||
if (scheduleTimeChoices
|
if (scheduleTimeChoices
|
||||||
.contains(shutdownTimerService.scheduledExitInMinutes)
|
.contains(
|
||||||
|
shutdownTimerService.scheduledExitInMinutes)
|
||||||
.not)
|
.not)
|
||||||
shutdownTimerService.scheduledExitInMinutes,
|
shutdownTimerService.scheduledExitInMinutes,
|
||||||
]..sort(),
|
]..sort(),
|
||||||
@@ -614,8 +613,8 @@ class _HeaderControlState extends State<HeaderControl> {
|
|||||||
FilteringTextInputFormatter.allow(
|
FilteringTextInputFormatter.allow(
|
||||||
RegExp(r'\d+')),
|
RegExp(r'\d+')),
|
||||||
],
|
],
|
||||||
decoration:
|
decoration: const InputDecoration(
|
||||||
const InputDecoration(suffixText: 'min'),
|
suffixText: 'min'),
|
||||||
),
|
),
|
||||||
actions: [
|
actions: [
|
||||||
TextButton(
|
TextButton(
|
||||||
@@ -631,10 +630,12 @@ class _HeaderControlState extends State<HeaderControl> {
|
|||||||
TextButton(
|
TextButton(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
Get.back();
|
Get.back();
|
||||||
int choice = int.tryParse(duration) ?? 0;
|
int choice =
|
||||||
|
int.tryParse(duration) ?? 0;
|
||||||
shutdownTimerService
|
shutdownTimerService
|
||||||
.scheduledExitInMinutes = choice;
|
.scheduledExitInMinutes = choice;
|
||||||
shutdownTimerService.startShutdownTimer();
|
shutdownTimerService
|
||||||
|
.startShutdownTimer();
|
||||||
setState(() {});
|
setState(() {});
|
||||||
},
|
},
|
||||||
child: Text('确定'),
|
child: Text('确定'),
|
||||||
@@ -645,7 +646,8 @@ class _HeaderControlState extends State<HeaderControl> {
|
|||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
Get.back();
|
Get.back();
|
||||||
shutdownTimerService.scheduledExitInMinutes = choice;
|
shutdownTimerService.scheduledExitInMinutes =
|
||||||
|
choice;
|
||||||
shutdownTimerService.startShutdownTimer();
|
shutdownTimerService.startShutdownTimer();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -655,8 +657,8 @@ class _HeaderControlState extends State<HeaderControl> {
|
|||||||
: choice == 0
|
: choice == 0
|
||||||
? "禁用"
|
? "禁用"
|
||||||
: "$choice分钟后"),
|
: "$choice分钟后"),
|
||||||
trailing:
|
trailing: shutdownTimerService.scheduledExitInMinutes ==
|
||||||
shutdownTimerService.scheduledExitInMinutes == choice
|
choice
|
||||||
? Icon(
|
? Icon(
|
||||||
Icons.done,
|
Icons.done,
|
||||||
color: Theme.of(context).colorScheme.primary,
|
color: Theme.of(context).colorScheme.primary,
|
||||||
@@ -682,8 +684,8 @@ class _HeaderControlState extends State<HeaderControl> {
|
|||||||
contentPadding: const EdgeInsets.only(),
|
contentPadding: const EdgeInsets.only(),
|
||||||
title: const Text("额外等待视频播放完毕", style: titleStyle),
|
title: const Text("额外等待视频播放完毕", style: titleStyle),
|
||||||
trailing: Transform.scale(
|
trailing: Transform.scale(
|
||||||
alignment:
|
alignment: Alignment
|
||||||
Alignment.centerRight, // 缩放Switch的大小后保持右侧对齐, 避免右侧空隙过大
|
.centerRight, // 缩放Switch的大小后保持右侧对齐, 避免右侧空隙过大
|
||||||
scale: 0.8,
|
scale: 0.8,
|
||||||
child: Switch(
|
child: Switch(
|
||||||
thumbIcon: WidgetStateProperty.resolveWith<Icon?>(
|
thumbIcon: WidgetStateProperty.resolveWith<Icon?>(
|
||||||
@@ -696,7 +698,8 @@ class _HeaderControlState extends State<HeaderControl> {
|
|||||||
}),
|
}),
|
||||||
value: shutdownTimerService.waitForPlayingCompleted,
|
value: shutdownTimerService.waitForPlayingCompleted,
|
||||||
onChanged: (value) => setState(() =>
|
onChanged: (value) => setState(() =>
|
||||||
shutdownTimerService.waitForPlayingCompleted = value),
|
shutdownTimerService.waitForPlayingCompleted =
|
||||||
|
value),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -730,6 +733,8 @@ class _HeaderControlState extends State<HeaderControl> {
|
|||||||
const SizedBox(height: 10),
|
const SizedBox(height: 10),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
@@ -761,20 +766,19 @@ class _HeaderControlState extends State<HeaderControl> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Utils.showFSSheet(
|
Utils.showFSSheet(
|
||||||
|
context,
|
||||||
isFullScreen: () => isFullScreen,
|
isFullScreen: () => isFullScreen,
|
||||||
child: Builder(
|
child: Theme(
|
||||||
builder: (context) => Container(
|
data: Theme.of(context),
|
||||||
|
child: Material(
|
||||||
|
color: Colors.transparent,
|
||||||
|
child: Container(
|
||||||
clipBehavior: Clip.hardEdge,
|
clipBehavior: Clip.hardEdge,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Theme.of(context).colorScheme.surface,
|
color: Theme.of(context).colorScheme.surface,
|
||||||
borderRadius: const BorderRadius.all(Radius.circular(12)),
|
borderRadius: const BorderRadius.all(Radius.circular(12)),
|
||||||
),
|
),
|
||||||
margin: EdgeInsets.only(
|
margin: const EdgeInsets.all(12),
|
||||||
left: 12,
|
|
||||||
top: 12,
|
|
||||||
right: 12,
|
|
||||||
bottom: 12 + MediaQuery.paddingOf(context).bottom,
|
|
||||||
),
|
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
SizedBox(
|
SizedBox(
|
||||||
@@ -803,7 +807,7 @@ class _HeaderControlState extends State<HeaderControl> {
|
|||||||
color: Colors.transparent,
|
color: Colors.transparent,
|
||||||
child: Scrollbar(
|
child: Scrollbar(
|
||||||
child: ListView(
|
child: ListView(
|
||||||
padding: EdgeInsets.only(bottom: 0),
|
padding: EdgeInsets.zero,
|
||||||
children: [
|
children: [
|
||||||
for (int i = 0; i < totalQaSam; i++) ...[
|
for (int i = 0; i < totalQaSam; i++) ...[
|
||||||
ListTile(
|
ListTile(
|
||||||
@@ -856,6 +860,7 @@ class _HeaderControlState extends State<HeaderControl> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -864,20 +869,19 @@ class _HeaderControlState extends State<HeaderControl> {
|
|||||||
final AudioQuality currentAudioQa = videoDetailCtr.currentAudioQa!;
|
final AudioQuality currentAudioQa = videoDetailCtr.currentAudioQa!;
|
||||||
final List<AudioItem> audio = videoInfo.dash!.audio!;
|
final List<AudioItem> audio = videoInfo.dash!.audio!;
|
||||||
Utils.showFSSheet(
|
Utils.showFSSheet(
|
||||||
|
context,
|
||||||
isFullScreen: () => isFullScreen,
|
isFullScreen: () => isFullScreen,
|
||||||
child: Builder(
|
child: Theme(
|
||||||
builder: (context) => Container(
|
data: Theme.of(context),
|
||||||
|
child: Material(
|
||||||
|
color: Colors.transparent,
|
||||||
|
child: Container(
|
||||||
clipBehavior: Clip.hardEdge,
|
clipBehavior: Clip.hardEdge,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Theme.of(context).colorScheme.surface,
|
color: Theme.of(context).colorScheme.surface,
|
||||||
borderRadius: const BorderRadius.all(Radius.circular(12)),
|
borderRadius: const BorderRadius.all(Radius.circular(12)),
|
||||||
),
|
),
|
||||||
margin: EdgeInsets.only(
|
margin: const EdgeInsets.all(12),
|
||||||
left: 12,
|
|
||||||
top: 12,
|
|
||||||
right: 12,
|
|
||||||
bottom: 12 + MediaQuery.paddingOf(context).bottom,
|
|
||||||
),
|
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
const SizedBox(
|
const SizedBox(
|
||||||
@@ -887,7 +891,7 @@ class _HeaderControlState extends State<HeaderControl> {
|
|||||||
child: Material(
|
child: Material(
|
||||||
color: Colors.transparent,
|
color: Colors.transparent,
|
||||||
child: ListView(
|
child: ListView(
|
||||||
padding: EdgeInsets.only(bottom: 0),
|
padding: EdgeInsets.zero,
|
||||||
children: [
|
children: [
|
||||||
for (final AudioItem i in audio) ...[
|
for (final AudioItem i in audio) ...[
|
||||||
ListTile(
|
ListTile(
|
||||||
@@ -921,7 +925,8 @@ class _HeaderControlState extends State<HeaderControl> {
|
|||||||
trailing: currentAudioQa.code == i.id
|
trailing: currentAudioQa.code == i.id
|
||||||
? Icon(
|
? Icon(
|
||||||
Icons.done,
|
Icons.done,
|
||||||
color: Theme.of(context).colorScheme.primary,
|
color:
|
||||||
|
Theme.of(context).colorScheme.primary,
|
||||||
)
|
)
|
||||||
: const SizedBox(),
|
: const SizedBox(),
|
||||||
),
|
),
|
||||||
@@ -934,6 +939,7 @@ class _HeaderControlState extends State<HeaderControl> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -954,20 +960,19 @@ class _HeaderControlState extends State<HeaderControl> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Utils.showFSSheet(
|
Utils.showFSSheet(
|
||||||
|
context,
|
||||||
isFullScreen: () => isFullScreen,
|
isFullScreen: () => isFullScreen,
|
||||||
child: Builder(
|
child: Theme(
|
||||||
builder: (context) => Container(
|
data: Theme.of(context),
|
||||||
|
child: Material(
|
||||||
|
color: Colors.transparent,
|
||||||
|
child: Container(
|
||||||
clipBehavior: Clip.hardEdge,
|
clipBehavior: Clip.hardEdge,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Theme.of(context).colorScheme.surface,
|
color: Theme.of(context).colorScheme.surface,
|
||||||
borderRadius: const BorderRadius.all(Radius.circular(12)),
|
borderRadius: const BorderRadius.all(Radius.circular(12)),
|
||||||
),
|
),
|
||||||
margin: EdgeInsets.only(
|
margin: const EdgeInsets.all(12),
|
||||||
left: 12,
|
|
||||||
top: 12,
|
|
||||||
right: 12,
|
|
||||||
bottom: 12 + MediaQuery.paddingOf(context).bottom,
|
|
||||||
),
|
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
const SizedBox(
|
const SizedBox(
|
||||||
@@ -977,7 +982,7 @@ class _HeaderControlState extends State<HeaderControl> {
|
|||||||
child: Material(
|
child: Material(
|
||||||
color: Colors.transparent,
|
color: Colors.transparent,
|
||||||
child: ListView(
|
child: ListView(
|
||||||
padding: EdgeInsets.only(bottom: 0),
|
padding: EdgeInsets.zero,
|
||||||
children: [
|
children: [
|
||||||
for (var i in list) ...[
|
for (var i in list) ...[
|
||||||
ListTile(
|
ListTile(
|
||||||
@@ -1002,7 +1007,8 @@ class _HeaderControlState extends State<HeaderControl> {
|
|||||||
trailing: i.startsWith(currentDecodeFormats.code)
|
trailing: i.startsWith(currentDecodeFormats.code)
|
||||||
? Icon(
|
? Icon(
|
||||||
Icons.done,
|
Icons.done,
|
||||||
color: Theme.of(context).colorScheme.primary,
|
color:
|
||||||
|
Theme.of(context).colorScheme.primary,
|
||||||
)
|
)
|
||||||
: const SizedBox(),
|
: const SizedBox(),
|
||||||
),
|
),
|
||||||
@@ -1015,6 +1021,7 @@ class _HeaderControlState extends State<HeaderControl> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1062,27 +1069,27 @@ class _HeaderControlState extends State<HeaderControl> {
|
|||||||
final DanmakuController? danmakuController =
|
final DanmakuController? danmakuController =
|
||||||
widget.controller.danmakuController;
|
widget.controller.danmakuController;
|
||||||
Utils.showFSSheet(
|
Utils.showFSSheet(
|
||||||
|
context,
|
||||||
isFullScreen: () => isFullScreen,
|
isFullScreen: () => isFullScreen,
|
||||||
padding: isFullScreen ? 70 : null,
|
padding: isFullScreen ? 70 : null,
|
||||||
child: StatefulBuilder(
|
child: StatefulBuilder(
|
||||||
builder: (BuildContext context, StateSetter setState) {
|
builder: (_, setState) {
|
||||||
return Container(
|
return Theme(
|
||||||
|
data: Theme.of(context),
|
||||||
|
child: Material(
|
||||||
|
color: Colors.transparent,
|
||||||
|
child: Container(
|
||||||
clipBehavior: Clip.hardEdge,
|
clipBehavior: Clip.hardEdge,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Theme.of(context).colorScheme.surface,
|
color: Theme.of(context).colorScheme.surface,
|
||||||
borderRadius: const BorderRadius.all(Radius.circular(12)),
|
borderRadius: const BorderRadius.all(Radius.circular(12)),
|
||||||
),
|
),
|
||||||
margin: EdgeInsets.only(
|
margin: const EdgeInsets.all(12),
|
||||||
left: 12,
|
|
||||||
top: 12,
|
|
||||||
right: 12,
|
|
||||||
bottom: MediaQuery.paddingOf(context).bottom + 12,
|
|
||||||
),
|
|
||||||
padding: const EdgeInsets.only(left: 14, right: 14),
|
padding: const EdgeInsets.only(left: 14, right: 14),
|
||||||
child: ListView(
|
child: ListView(
|
||||||
padding: EdgeInsets.only(bottom: 0),
|
padding: EdgeInsets.zero,
|
||||||
children: [
|
children: [
|
||||||
const SizedBox(
|
SizedBox(
|
||||||
height: 45,
|
height: 45,
|
||||||
child: Center(child: Text('弹幕/字幕设置', style: titleStyle)),
|
child: Center(child: Text('弹幕/字幕设置', style: titleStyle)),
|
||||||
),
|
),
|
||||||
@@ -1102,7 +1109,8 @@ class _HeaderControlState extends State<HeaderControl> {
|
|||||||
Get.toNamed('/danmakuBlock',
|
Get.toNamed('/danmakuBlock',
|
||||||
arguments: widget.controller)
|
arguments: widget.controller)
|
||||||
},
|
},
|
||||||
child: Text("屏蔽管理(${widget.controller.filterCount})")),
|
child:
|
||||||
|
Text("屏蔽管理(${widget.controller.filterCount})")),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
@@ -1116,10 +1124,11 @@ class _HeaderControlState extends State<HeaderControl> {
|
|||||||
data: SliderThemeData(
|
data: SliderThemeData(
|
||||||
trackShape: MSliderTrackShape(),
|
trackShape: MSliderTrackShape(),
|
||||||
thumbColor: Theme.of(context).colorScheme.primary,
|
thumbColor: Theme.of(context).colorScheme.primary,
|
||||||
activeTrackColor: Theme.of(context).colorScheme.primary,
|
activeTrackColor:
|
||||||
|
Theme.of(context).colorScheme.primary,
|
||||||
trackHeight: 10,
|
trackHeight: 10,
|
||||||
thumbShape:
|
thumbShape: const RoundSliderThumbShape(
|
||||||
const RoundSliderThumbShape(enabledThumbRadius: 6.0),
|
enabledThumbRadius: 6.0),
|
||||||
),
|
),
|
||||||
child: Slider(
|
child: Slider(
|
||||||
min: 0,
|
min: 0,
|
||||||
@@ -1142,10 +1151,12 @@ class _HeaderControlState extends State<HeaderControl> {
|
|||||||
padding: const EdgeInsets.only(top: 12, bottom: 18),
|
padding: const EdgeInsets.only(top: 12, bottom: 18),
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
for (final Map<String, dynamic> i in blockTypesList) ...[
|
for (final Map<String, dynamic> i
|
||||||
|
in blockTypesList) ...[
|
||||||
ActionRowLineItem(
|
ActionRowLineItem(
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
final bool isChoose = blockTypes.contains(i['value']);
|
final bool isChoose =
|
||||||
|
blockTypes.contains(i['value']);
|
||||||
if (isChoose) {
|
if (isChoose) {
|
||||||
blockTypes.remove(i['value']);
|
blockTypes.remove(i['value']);
|
||||||
} else {
|
} else {
|
||||||
@@ -1214,7 +1225,8 @@ class _HeaderControlState extends State<HeaderControl> {
|
|||||||
setState(() {});
|
setState(() {});
|
||||||
try {
|
try {
|
||||||
danmakuController?.updateOption(
|
danmakuController?.updateOption(
|
||||||
danmakuController.option.copyWith(massiveMode: value),
|
danmakuController.option
|
||||||
|
.copyWith(massiveMode: value),
|
||||||
);
|
);
|
||||||
} catch (_) {}
|
} catch (_) {}
|
||||||
},
|
},
|
||||||
@@ -1231,10 +1243,11 @@ class _HeaderControlState extends State<HeaderControl> {
|
|||||||
data: SliderThemeData(
|
data: SliderThemeData(
|
||||||
trackShape: MSliderTrackShape(),
|
trackShape: MSliderTrackShape(),
|
||||||
thumbColor: Theme.of(context).colorScheme.primary,
|
thumbColor: Theme.of(context).colorScheme.primary,
|
||||||
activeTrackColor: Theme.of(context).colorScheme.primary,
|
activeTrackColor:
|
||||||
|
Theme.of(context).colorScheme.primary,
|
||||||
trackHeight: 10,
|
trackHeight: 10,
|
||||||
thumbShape:
|
thumbShape: const RoundSliderThumbShape(
|
||||||
const RoundSliderThumbShape(enabledThumbRadius: 6.0),
|
enabledThumbRadius: 6.0),
|
||||||
),
|
),
|
||||||
child: Slider(
|
child: Slider(
|
||||||
min: 0,
|
min: 0,
|
||||||
@@ -1269,10 +1282,11 @@ class _HeaderControlState extends State<HeaderControl> {
|
|||||||
data: SliderThemeData(
|
data: SliderThemeData(
|
||||||
trackShape: MSliderTrackShape(),
|
trackShape: MSliderTrackShape(),
|
||||||
thumbColor: Theme.of(context).colorScheme.primary,
|
thumbColor: Theme.of(context).colorScheme.primary,
|
||||||
activeTrackColor: Theme.of(context).colorScheme.primary,
|
activeTrackColor:
|
||||||
|
Theme.of(context).colorScheme.primary,
|
||||||
trackHeight: 10,
|
trackHeight: 10,
|
||||||
thumbShape:
|
thumbShape: const RoundSliderThumbShape(
|
||||||
const RoundSliderThumbShape(enabledThumbRadius: 6.0),
|
enabledThumbRadius: 6.0),
|
||||||
),
|
),
|
||||||
child: Slider(
|
child: Slider(
|
||||||
min: 0,
|
min: 0,
|
||||||
@@ -1308,10 +1322,11 @@ class _HeaderControlState extends State<HeaderControl> {
|
|||||||
data: SliderThemeData(
|
data: SliderThemeData(
|
||||||
trackShape: MSliderTrackShape(),
|
trackShape: MSliderTrackShape(),
|
||||||
thumbColor: Theme.of(context).colorScheme.primary,
|
thumbColor: Theme.of(context).colorScheme.primary,
|
||||||
activeTrackColor: Theme.of(context).colorScheme.primary,
|
activeTrackColor:
|
||||||
|
Theme.of(context).colorScheme.primary,
|
||||||
trackHeight: 10,
|
trackHeight: 10,
|
||||||
thumbShape:
|
thumbShape: const RoundSliderThumbShape(
|
||||||
const RoundSliderThumbShape(enabledThumbRadius: 6.0),
|
enabledThumbRadius: 6.0),
|
||||||
),
|
),
|
||||||
child: Slider(
|
child: Slider(
|
||||||
min: 0,
|
min: 0,
|
||||||
@@ -1327,7 +1342,8 @@ class _HeaderControlState extends State<HeaderControl> {
|
|||||||
setState(() {});
|
setState(() {});
|
||||||
try {
|
try {
|
||||||
danmakuController?.updateOption(
|
danmakuController?.updateOption(
|
||||||
danmakuController.option.copyWith(strokeWidth: val),
|
danmakuController.option
|
||||||
|
.copyWith(strokeWidth: val),
|
||||||
);
|
);
|
||||||
} catch (_) {}
|
} catch (_) {}
|
||||||
},
|
},
|
||||||
@@ -1346,10 +1362,11 @@ class _HeaderControlState extends State<HeaderControl> {
|
|||||||
data: SliderThemeData(
|
data: SliderThemeData(
|
||||||
trackShape: MSliderTrackShape(),
|
trackShape: MSliderTrackShape(),
|
||||||
thumbColor: Theme.of(context).colorScheme.primary,
|
thumbColor: Theme.of(context).colorScheme.primary,
|
||||||
activeTrackColor: Theme.of(context).colorScheme.primary,
|
activeTrackColor:
|
||||||
|
Theme.of(context).colorScheme.primary,
|
||||||
trackHeight: 10,
|
trackHeight: 10,
|
||||||
thumbShape:
|
thumbShape: const RoundSliderThumbShape(
|
||||||
const RoundSliderThumbShape(enabledThumbRadius: 6.0),
|
enabledThumbRadius: 6.0),
|
||||||
),
|
),
|
||||||
child: Slider(
|
child: Slider(
|
||||||
min: 0.5,
|
min: 0.5,
|
||||||
@@ -1388,10 +1405,11 @@ class _HeaderControlState extends State<HeaderControl> {
|
|||||||
data: SliderThemeData(
|
data: SliderThemeData(
|
||||||
trackShape: MSliderTrackShape(),
|
trackShape: MSliderTrackShape(),
|
||||||
thumbColor: Theme.of(context).colorScheme.primary,
|
thumbColor: Theme.of(context).colorScheme.primary,
|
||||||
activeTrackColor: Theme.of(context).colorScheme.primary,
|
activeTrackColor:
|
||||||
|
Theme.of(context).colorScheme.primary,
|
||||||
trackHeight: 10,
|
trackHeight: 10,
|
||||||
thumbShape:
|
thumbShape: const RoundSliderThumbShape(
|
||||||
const RoundSliderThumbShape(enabledThumbRadius: 6.0),
|
enabledThumbRadius: 6.0),
|
||||||
),
|
),
|
||||||
child: Slider(
|
child: Slider(
|
||||||
min: 0.5,
|
min: 0.5,
|
||||||
@@ -1430,10 +1448,11 @@ class _HeaderControlState extends State<HeaderControl> {
|
|||||||
data: SliderThemeData(
|
data: SliderThemeData(
|
||||||
trackShape: MSliderTrackShape(),
|
trackShape: MSliderTrackShape(),
|
||||||
thumbColor: Theme.of(context).colorScheme.primary,
|
thumbColor: Theme.of(context).colorScheme.primary,
|
||||||
activeTrackColor: Theme.of(context).colorScheme.primary,
|
activeTrackColor:
|
||||||
|
Theme.of(context).colorScheme.primary,
|
||||||
trackHeight: 10,
|
trackHeight: 10,
|
||||||
thumbShape:
|
thumbShape: const RoundSliderThumbShape(
|
||||||
const RoundSliderThumbShape(enabledThumbRadius: 6.0),
|
enabledThumbRadius: 6.0),
|
||||||
),
|
),
|
||||||
child: Slider(
|
child: Slider(
|
||||||
min: 1,
|
min: 1,
|
||||||
@@ -1471,10 +1490,11 @@ class _HeaderControlState extends State<HeaderControl> {
|
|||||||
data: SliderThemeData(
|
data: SliderThemeData(
|
||||||
trackShape: MSliderTrackShape(),
|
trackShape: MSliderTrackShape(),
|
||||||
thumbColor: Theme.of(context).colorScheme.primary,
|
thumbColor: Theme.of(context).colorScheme.primary,
|
||||||
activeTrackColor: Theme.of(context).colorScheme.primary,
|
activeTrackColor:
|
||||||
|
Theme.of(context).colorScheme.primary,
|
||||||
trackHeight: 10,
|
trackHeight: 10,
|
||||||
thumbShape:
|
thumbShape: const RoundSliderThumbShape(
|
||||||
const RoundSliderThumbShape(enabledThumbRadius: 6.0),
|
enabledThumbRadius: 6.0),
|
||||||
),
|
),
|
||||||
child: Slider(
|
child: Slider(
|
||||||
min: 1.0,
|
min: 1.0,
|
||||||
@@ -1498,7 +1518,8 @@ class _HeaderControlState extends State<HeaderControl> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Text('字幕字体大小 ${(subtitleFontScale * 100).toStringAsFixed(1)}%'),
|
Text(
|
||||||
|
'字幕字体大小 ${(subtitleFontScale * 100).toStringAsFixed(1)}%'),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.only(
|
padding: const EdgeInsets.only(
|
||||||
top: 0,
|
top: 0,
|
||||||
@@ -1510,17 +1531,19 @@ class _HeaderControlState extends State<HeaderControl> {
|
|||||||
data: SliderThemeData(
|
data: SliderThemeData(
|
||||||
trackShape: MSliderTrackShape(),
|
trackShape: MSliderTrackShape(),
|
||||||
thumbColor: Theme.of(context).colorScheme.primary,
|
thumbColor: Theme.of(context).colorScheme.primary,
|
||||||
activeTrackColor: Theme.of(context).colorScheme.primary,
|
activeTrackColor:
|
||||||
|
Theme.of(context).colorScheme.primary,
|
||||||
trackHeight: 10,
|
trackHeight: 10,
|
||||||
thumbShape:
|
thumbShape: const RoundSliderThumbShape(
|
||||||
const RoundSliderThumbShape(enabledThumbRadius: 6.0),
|
enabledThumbRadius: 6.0),
|
||||||
),
|
),
|
||||||
child: Slider(
|
child: Slider(
|
||||||
min: 0.5,
|
min: 0.5,
|
||||||
max: 2.5,
|
max: 2.5,
|
||||||
value: subtitleFontScale,
|
value: subtitleFontScale,
|
||||||
divisions: 20,
|
divisions: 20,
|
||||||
label: '${(subtitleFontScale * 100).toStringAsFixed(1)}%',
|
label:
|
||||||
|
'${(subtitleFontScale * 100).toStringAsFixed(1)}%',
|
||||||
onChanged: (double val) {
|
onChanged: (double val) {
|
||||||
subtitleFontScale = val;
|
subtitleFontScale = val;
|
||||||
widget.controller
|
widget.controller
|
||||||
@@ -1545,17 +1568,19 @@ class _HeaderControlState extends State<HeaderControl> {
|
|||||||
data: SliderThemeData(
|
data: SliderThemeData(
|
||||||
trackShape: MSliderTrackShape(),
|
trackShape: MSliderTrackShape(),
|
||||||
thumbColor: Theme.of(context).colorScheme.primary,
|
thumbColor: Theme.of(context).colorScheme.primary,
|
||||||
activeTrackColor: Theme.of(context).colorScheme.primary,
|
activeTrackColor:
|
||||||
|
Theme.of(context).colorScheme.primary,
|
||||||
trackHeight: 10,
|
trackHeight: 10,
|
||||||
thumbShape:
|
thumbShape: const RoundSliderThumbShape(
|
||||||
const RoundSliderThumbShape(enabledThumbRadius: 6.0),
|
enabledThumbRadius: 6.0),
|
||||||
),
|
),
|
||||||
child: Slider(
|
child: Slider(
|
||||||
min: 0.5,
|
min: 0.5,
|
||||||
max: 2.5,
|
max: 2.5,
|
||||||
value: subtitleFontScaleFS,
|
value: subtitleFontScaleFS,
|
||||||
divisions: 20,
|
divisions: 20,
|
||||||
label: '${(subtitleFontScaleFS * 100).toStringAsFixed(1)}%',
|
label:
|
||||||
|
'${(subtitleFontScaleFS * 100).toStringAsFixed(1)}%',
|
||||||
onChanged: (double val) {
|
onChanged: (double val) {
|
||||||
subtitleFontScaleFS = val;
|
subtitleFontScaleFS = val;
|
||||||
widget.controller
|
widget.controller
|
||||||
@@ -1579,10 +1604,11 @@ class _HeaderControlState extends State<HeaderControl> {
|
|||||||
data: SliderThemeData(
|
data: SliderThemeData(
|
||||||
trackShape: MSliderTrackShape(),
|
trackShape: MSliderTrackShape(),
|
||||||
thumbColor: Theme.of(context).colorScheme.primary,
|
thumbColor: Theme.of(context).colorScheme.primary,
|
||||||
activeTrackColor: Theme.of(context).colorScheme.primary,
|
activeTrackColor:
|
||||||
|
Theme.of(context).colorScheme.primary,
|
||||||
trackHeight: 10,
|
trackHeight: 10,
|
||||||
thumbShape:
|
thumbShape: const RoundSliderThumbShape(
|
||||||
const RoundSliderThumbShape(enabledThumbRadius: 6.0),
|
enabledThumbRadius: 6.0),
|
||||||
),
|
),
|
||||||
child: Slider(
|
child: Slider(
|
||||||
min: 0,
|
min: 0,
|
||||||
@@ -1613,10 +1639,11 @@ class _HeaderControlState extends State<HeaderControl> {
|
|||||||
data: SliderThemeData(
|
data: SliderThemeData(
|
||||||
trackShape: MSliderTrackShape(),
|
trackShape: MSliderTrackShape(),
|
||||||
thumbColor: Theme.of(context).colorScheme.primary,
|
thumbColor: Theme.of(context).colorScheme.primary,
|
||||||
activeTrackColor: Theme.of(context).colorScheme.primary,
|
activeTrackColor:
|
||||||
|
Theme.of(context).colorScheme.primary,
|
||||||
trackHeight: 10,
|
trackHeight: 10,
|
||||||
thumbShape:
|
thumbShape: const RoundSliderThumbShape(
|
||||||
const RoundSliderThumbShape(enabledThumbRadius: 6.0),
|
enabledThumbRadius: 6.0),
|
||||||
),
|
),
|
||||||
child: Slider(
|
child: Slider(
|
||||||
min: 0,
|
min: 0,
|
||||||
@@ -1647,10 +1674,11 @@ class _HeaderControlState extends State<HeaderControl> {
|
|||||||
data: SliderThemeData(
|
data: SliderThemeData(
|
||||||
trackShape: MSliderTrackShape(),
|
trackShape: MSliderTrackShape(),
|
||||||
thumbColor: Theme.of(context).colorScheme.primary,
|
thumbColor: Theme.of(context).colorScheme.primary,
|
||||||
activeTrackColor: Theme.of(context).colorScheme.primary,
|
activeTrackColor:
|
||||||
|
Theme.of(context).colorScheme.primary,
|
||||||
trackHeight: 10,
|
trackHeight: 10,
|
||||||
thumbShape:
|
thumbShape: const RoundSliderThumbShape(
|
||||||
const RoundSliderThumbShape(enabledThumbRadius: 6.0),
|
enabledThumbRadius: 6.0),
|
||||||
),
|
),
|
||||||
child: Slider(
|
child: Slider(
|
||||||
min: 0,
|
min: 0,
|
||||||
@@ -1670,28 +1698,30 @@ class _HeaderControlState extends State<HeaderControl> {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}),
|
},
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 播放顺序
|
/// 播放顺序
|
||||||
void showSetRepeat() async {
|
void showSetRepeat() async {
|
||||||
Utils.showFSSheet(
|
Utils.showFSSheet(
|
||||||
|
context,
|
||||||
isFullScreen: () => isFullScreen,
|
isFullScreen: () => isFullScreen,
|
||||||
child: Builder(
|
child: Theme(
|
||||||
builder: (context) => Container(
|
data: Theme.of(context),
|
||||||
|
child: Material(
|
||||||
|
color: Colors.transparent,
|
||||||
|
child: Container(
|
||||||
clipBehavior: Clip.hardEdge,
|
clipBehavior: Clip.hardEdge,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Theme.of(context).colorScheme.surface,
|
color: Theme.of(context).colorScheme.surface,
|
||||||
borderRadius: const BorderRadius.all(Radius.circular(12)),
|
borderRadius: const BorderRadius.all(Radius.circular(12)),
|
||||||
),
|
),
|
||||||
margin: EdgeInsets.only(
|
margin: const EdgeInsets.all(12),
|
||||||
left: 12,
|
|
||||||
top: 12,
|
|
||||||
right: 12,
|
|
||||||
bottom: 12 + MediaQuery.paddingOf(context).bottom,
|
|
||||||
),
|
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
const SizedBox(
|
const SizedBox(
|
||||||
@@ -1701,7 +1731,7 @@ class _HeaderControlState extends State<HeaderControl> {
|
|||||||
child: Material(
|
child: Material(
|
||||||
color: Colors.transparent,
|
color: Colors.transparent,
|
||||||
child: ListView(
|
child: ListView(
|
||||||
padding: EdgeInsets.only(bottom: 0),
|
padding: EdgeInsets.zero,
|
||||||
children: [
|
children: [
|
||||||
for (final PlayRepeat i in PlayRepeat.values) ...[
|
for (final PlayRepeat i in PlayRepeat.values) ...[
|
||||||
ListTile(
|
ListTile(
|
||||||
@@ -1716,7 +1746,8 @@ class _HeaderControlState extends State<HeaderControl> {
|
|||||||
trailing: widget.controller.playRepeat == i
|
trailing: widget.controller.playRepeat == i
|
||||||
? Icon(
|
? Icon(
|
||||||
Icons.done,
|
Icons.done,
|
||||||
color: Theme.of(context).colorScheme.primary,
|
color:
|
||||||
|
Theme.of(context).colorScheme.primary,
|
||||||
)
|
)
|
||||||
: const SizedBox(),
|
: const SizedBox(),
|
||||||
)
|
)
|
||||||
@@ -1729,6 +1760,7 @@ class _HeaderControlState extends State<HeaderControl> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -270,41 +270,52 @@ class Utils {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void showFSSheet({
|
static void showFSSheet(
|
||||||
|
BuildContext context, {
|
||||||
required Widget child,
|
required Widget child,
|
||||||
required Function isFullScreen,
|
required Function isFullScreen,
|
||||||
double? padding,
|
double? padding,
|
||||||
}) {
|
}) {
|
||||||
Navigator.of(Get.context!).push(
|
Navigator.of(context).push(
|
||||||
GetDialogRoute(
|
GetDialogRoute(
|
||||||
pageBuilder: (buildContext, animation, secondaryAnimation) {
|
pageBuilder: (buildContext, animation, secondaryAnimation) {
|
||||||
return MediaQuery.orientationOf(Get.context!) == Orientation.portrait
|
return MediaQuery.orientationOf(Get.context!) == Orientation.portrait
|
||||||
? Column(
|
? SafeArea(
|
||||||
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
const Spacer(flex: 3),
|
const Spacer(flex: 3),
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 7,
|
flex: 7,
|
||||||
child: MediaQuery.removePadding(
|
child: MediaQuery.removePadding(
|
||||||
context: Get.context!,
|
context: context,
|
||||||
removeTop: true,
|
removeTop: true,
|
||||||
|
removeBottom: true,
|
||||||
|
removeLeft: true,
|
||||||
|
removeRight: true,
|
||||||
child: child,
|
child: child,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
if (isFullScreen() && padding != null)
|
if (isFullScreen() && padding != null)
|
||||||
SizedBox(height: padding),
|
SizedBox(height: padding),
|
||||||
],
|
],
|
||||||
|
),
|
||||||
)
|
)
|
||||||
: Row(
|
: SafeArea(
|
||||||
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
const Spacer(),
|
const Spacer(),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: MediaQuery.removePadding(
|
child: MediaQuery.removePadding(
|
||||||
context: Get.context!,
|
context: context,
|
||||||
|
removeTop: true,
|
||||||
|
removeBottom: true,
|
||||||
removeLeft: true,
|
removeLeft: true,
|
||||||
|
removeRight: true,
|
||||||
child: child,
|
child: child,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
transitionDuration: const Duration(milliseconds: 350),
|
transitionDuration: const Duration(milliseconds: 350),
|
||||||
|
|||||||
Reference in New Issue
Block a user