mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-07-26 05:20:09 +08:00
@@ -203,17 +203,16 @@ class _VideoReplyReplyPanelState extends State<VideoReplyReplyPanel>
|
||||
}
|
||||
return _header(theme, firstFloor);
|
||||
}),
|
||||
_sortWidget(theme),
|
||||
_sortWidget(theme.colorScheme),
|
||||
],
|
||||
Obx(() => _buildBody(theme, _controller.loadingState.value)),
|
||||
Obx(
|
||||
() => _buildBody(theme.colorScheme, _controller.loadingState.value),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
if (widget.isNested) {
|
||||
return ExtendedVisibilityDetector(
|
||||
uniqueKey: Key(_tag),
|
||||
child: child,
|
||||
);
|
||||
return ExtendedVisibilityDetector(uniqueKey: Key(_tag), child: child);
|
||||
}
|
||||
return child;
|
||||
}
|
||||
@@ -243,9 +242,9 @@ class _VideoReplyReplyPanelState extends State<VideoReplyReplyPanel>
|
||||
);
|
||||
}
|
||||
|
||||
Widget _sortWidget(ThemeData theme) {
|
||||
Widget _sortWidget(ColorScheme colorScheme) {
|
||||
return SliverPinnedHeader(
|
||||
backgroundColor: theme.colorScheme.surface,
|
||||
backgroundColor: colorScheme.surface,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.fromLTRB(12, 2.5, 6, 2.5),
|
||||
child: Row(
|
||||
@@ -265,18 +264,11 @@ class _VideoReplyReplyPanelState extends State<VideoReplyReplyPanel>
|
||||
TextButton.icon(
|
||||
style: Style.buttonStyle,
|
||||
onPressed: _controller.queryBySort,
|
||||
icon: Icon(
|
||||
Icons.sort,
|
||||
size: 16,
|
||||
color: theme.colorScheme.secondary,
|
||||
),
|
||||
icon: Icon(Icons.sort, size: 16, color: colorScheme.secondary),
|
||||
label: Obx(
|
||||
() => Text(
|
||||
_controller.sortType.value.text!,
|
||||
style: TextStyle(
|
||||
fontSize: 13,
|
||||
color: theme.colorScheme.secondary,
|
||||
),
|
||||
style: TextStyle(fontSize: 13, color: colorScheme.secondary),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -287,7 +279,7 @@ class _VideoReplyReplyPanelState extends State<VideoReplyReplyPanel>
|
||||
}
|
||||
|
||||
Widget _buildBody(
|
||||
ThemeData theme,
|
||||
ColorScheme colorScheme,
|
||||
LoadingState<List<ReplyInfo>?> loadingState,
|
||||
) {
|
||||
final jumpIndex = _controller.index.value;
|
||||
@@ -305,15 +297,13 @@ class _VideoReplyReplyPanelState extends State<VideoReplyReplyPanel>
|
||||
return Container(
|
||||
height: 125,
|
||||
alignment: Alignment.center,
|
||||
margin: EdgeInsets.only(
|
||||
bottom: MediaQuery.viewPaddingOf(context).bottom,
|
||||
),
|
||||
margin: .only(bottom: MediaQuery.viewPaddingOf(context).bottom),
|
||||
child: Text(
|
||||
_controller.isEnd ? '没有更多了' : '加载中...',
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
color: theme.colorScheme.outline,
|
||||
color: colorScheme.outline,
|
||||
),
|
||||
),
|
||||
);
|
||||
@@ -323,13 +313,10 @@ class _VideoReplyReplyPanelState extends State<VideoReplyReplyPanel>
|
||||
return ColoredBoxTransition(
|
||||
color: _colorAnimation ??= _controller.animController.drive(
|
||||
ColorTween(
|
||||
begin: theme.colorScheme.onInverseSurface,
|
||||
end: theme.colorScheme.surface,
|
||||
).chain(
|
||||
CurveTween(
|
||||
curve: const Interval(0.8, 1.0), // 前0.8s不变, 后0.2s开始动画
|
||||
),
|
||||
),
|
||||
begin: colorScheme.onInverseSurface,
|
||||
end: colorScheme.surface,
|
||||
// 前0.8s不变, 后0.2s开始动画
|
||||
).chain(CurveTween(curve: const Interval(0.8, 1.0))),
|
||||
),
|
||||
child: child,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user