mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-30 07:15:51 +08:00
@@ -735,8 +735,8 @@ class _AudioPageState extends State<AudioPage> {
|
||||
final baseBarColor = colorScheme.brightness.isDark
|
||||
? const Color(0x33FFFFFF)
|
||||
: const Color(0x33999999);
|
||||
return Obx(() {
|
||||
final child = ProgressBar(
|
||||
final child = Obx(
|
||||
() => ProgressBar(
|
||||
progress: _controller.position.value,
|
||||
total: _controller.duration.value,
|
||||
baseBarColor: baseBarColor,
|
||||
@@ -749,15 +749,15 @@ class _AudioPageState extends State<AudioPage> {
|
||||
onDragStart: _onDragStart,
|
||||
onDragUpdate: _onDragUpdate,
|
||||
onSeek: _onSeek,
|
||||
),
|
||||
);
|
||||
if (Utils.isDesktop) {
|
||||
return MouseRegion(
|
||||
cursor: SystemMouseCursors.click,
|
||||
child: child,
|
||||
);
|
||||
if (Utils.isDesktop) {
|
||||
return MouseRegion(
|
||||
cursor: SystemMouseCursors.click,
|
||||
child: child,
|
||||
);
|
||||
}
|
||||
return child;
|
||||
});
|
||||
}
|
||||
return child;
|
||||
}
|
||||
|
||||
Widget _buildDuration(ColorScheme colorScheme) {
|
||||
|
||||
@@ -42,8 +42,13 @@ abstract class CommonSearchPanelState<
|
||||
controller: controller.scrollController,
|
||||
physics: const AlwaysScrollableScrollPhysics(),
|
||||
slivers: [
|
||||
if (widget.searchType.hasHeader) buildHeader(theme),
|
||||
Obx(() => _buildBody(theme, controller.loadingState.value)),
|
||||
?buildHeader(theme),
|
||||
SliverPadding(
|
||||
padding: EdgeInsets.only(
|
||||
bottom: MediaQuery.viewPaddingOf(context).bottom + 100,
|
||||
),
|
||||
sliver: Obx(() => _buildBody(theme, controller.loadingState.value)),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
@@ -56,12 +61,7 @@ abstract class CommonSearchPanelState<
|
||||
Loading() => buildLoading,
|
||||
Success(:var response) =>
|
||||
response?.isNotEmpty == true
|
||||
? SliverPadding(
|
||||
padding: EdgeInsets.only(
|
||||
bottom: MediaQuery.viewPaddingOf(context).bottom + 100,
|
||||
),
|
||||
sliver: buildList(theme, response!),
|
||||
)
|
||||
? buildList(theme, response!)
|
||||
: HttpError(onReload: controller.onReload),
|
||||
Error(:var errMsg) => HttpError(
|
||||
errMsg: errMsg,
|
||||
@@ -70,7 +70,7 @@ abstract class CommonSearchPanelState<
|
||||
};
|
||||
}
|
||||
|
||||
Widget buildHeader(ThemeData theme) => throw UnimplementedError();
|
||||
Widget? buildHeader(ThemeData theme) => null;
|
||||
|
||||
Widget buildList(ThemeData theme, List<T> list);
|
||||
}
|
||||
|
||||
@@ -76,6 +76,7 @@ class _MediaListPanelState extends State<MediaListPanel>
|
||||
backgroundColor: Colors.transparent,
|
||||
actions: [
|
||||
iconButton(
|
||||
iconSize: 20,
|
||||
tooltip: widget.desc ? '顺序播放' : '倒序播放',
|
||||
icon: widget.desc
|
||||
? const Icon(MdiIcons.sortAscending)
|
||||
@@ -86,6 +87,7 @@ class _MediaListPanelState extends State<MediaListPanel>
|
||||
},
|
||||
),
|
||||
iconButton(
|
||||
iconSize: 20,
|
||||
tooltip: '关闭',
|
||||
icon: const Icon(Icons.close),
|
||||
onPressed: Get.back,
|
||||
|
||||
Reference in New Issue
Block a user