* fix: 1080p

* opt: import export

* opt: downloader

* opt: skeleton

* opt: parseColor

* tweak

* opt: sb seek

* opt: rxn
This commit is contained in:
My-Responsitories
2026-05-08 12:50:43 +00:00
committed by dom
parent 07843a5e77
commit b7bd516aa7
28 changed files with 253 additions and 370 deletions

View File

@@ -46,7 +46,7 @@ class _DynTopicPageState extends State<DynTopicPage> with DynMixin {
@override
Widget build(BuildContext context) {
final ThemeData theme = Theme.of(context);
final colorScheme = ColorScheme.of(context);
final padding = MediaQuery.viewPaddingOf(context);
return scaffold(
body: Stack(
@@ -60,7 +60,7 @@ class _DynTopicPageState extends State<DynTopicPage> with DynMixin {
slivers: [
Obx(
() => _buildAppBar(
theme,
colorScheme,
padding,
_controller.topState.value,
),
@@ -70,7 +70,7 @@ class _DynTopicPageState extends State<DynTopicPage> with DynMixin {
_controller.topicSortByConf.value?.allSortBy;
if (allSortBy != null && allSortBy.isNotEmpty) {
return SliverPinnedHeader(
backgroundColor: theme.colorScheme.surface,
backgroundColor: colorScheme.surface,
child: Padding(
padding: EdgeInsets.only(
left: 12 + padding.left,
@@ -80,9 +80,8 @@ class _DynTopicPageState extends State<DynTopicPage> with DynMixin {
child: Builder(
builder: (context) {
return ToggleButtons(
fillColor: theme.colorScheme.secondaryContainer,
selectedColor:
theme.colorScheme.onSecondaryContainer,
fillColor: colorScheme.secondaryContainer,
selectedColor: colorScheme.onSecondaryContainer,
constraints: const BoxConstraints(
minWidth: 54,
minHeight: 24,
@@ -159,7 +158,7 @@ class _DynTopicPageState extends State<DynTopicPage> with DynMixin {
}
Widget _buildAppBar(
ThemeData theme,
ColorScheme colorScheme,
EdgeInsets padding,
LoadingState<TopDetails?> topState,
) {
@@ -216,7 +215,7 @@ class _DynTopicPageState extends State<DynTopicPage> with DynMixin {
),
Text(
' 发起',
style: TextStyle(color: theme.colorScheme.outline),
style: TextStyle(color: colorScheme.outline),
),
],
),
@@ -232,7 +231,7 @@ class _DynTopicPageState extends State<DynTopicPage> with DynMixin {
const SizedBox(height: 6),
SelectableText(
response.topicItem!.description!,
style: TextStyle(color: theme.colorScheme.onSurfaceVariant),
style: TextStyle(color: colorScheme.onSurfaceVariant),
),
const SizedBox(height: 10),
Row(
@@ -241,7 +240,7 @@ class _DynTopicPageState extends State<DynTopicPage> with DynMixin {
'${NumUtils.numFormat(response.topicItem!.view)}浏览 · ${NumUtils.numFormat(response.topicItem!.discuss)}讨论',
style: TextStyle(
fontSize: 13,
color: theme.colorScheme.outline,
color: colorScheme.outline,
),
),
const Spacer(),
@@ -249,13 +248,11 @@ class _DynTopicPageState extends State<DynTopicPage> with DynMixin {
style: OutlinedButton.styleFrom(
side: BorderSide(
width: 1,
color: theme.colorScheme.outline.withValues(
alpha: 0.2,
),
color: colorScheme.outline.withValues(alpha: 0.2),
),
foregroundColor: _controller.isLike.value == true
foregroundColor: _controller.isLike.value
? null
: theme.colorScheme.onSurfaceVariant,
: colorScheme.onSurfaceVariant,
padding: const EdgeInsets.symmetric(horizontal: 10),
visualDensity: const VisualDensity(
horizontal: -4,
@@ -264,7 +261,7 @@ class _DynTopicPageState extends State<DynTopicPage> with DynMixin {
tapTargetSize: MaterialTapTargetSize.shrinkWrap,
),
onPressed: _controller.onLike,
icon: _controller.isLike.value == true
icon: _controller.isLike.value
? const Icon(FontAwesomeIcons.solidThumbsUp, size: 13)
: const Icon(FontAwesomeIcons.thumbsUp, size: 13),
label: Text(
@@ -278,22 +275,17 @@ class _DynTopicPageState extends State<DynTopicPage> with DynMixin {
style: OutlinedButton.styleFrom(
side: BorderSide(
width: 1,
color: theme.colorScheme.outline.withValues(
alpha: 0.2,
),
color: colorScheme.outline.withValues(alpha: 0.2),
),
foregroundColor: _controller.isFav.value == true
foregroundColor: _controller.isFav.value
? null
: theme.colorScheme.onSurfaceVariant,
: colorScheme.onSurfaceVariant,
padding: const EdgeInsets.symmetric(horizontal: 10),
visualDensity: const VisualDensity(
horizontal: -4,
vertical: -4,
),
visualDensity: const .new(horizontal: -4, vertical: -4),
tapTargetSize: MaterialTapTargetSize.shrinkWrap,
),
onPressed: _controller.onFav,
icon: _controller.isFav.value == true
icon: _controller.isFav.value
? const Icon(FontAwesomeIcons.solidStar, size: 13)
: const Icon(FontAwesomeIcons.star, size: 13),
label: Text(
@@ -322,7 +314,7 @@ class _DynTopicPageState extends State<DynTopicPage> with DynMixin {
PopupMenuItem(
onTap: _controller.onFav,
child: Text(
'${_controller.isFav.value == true ? '取消' : ''}收藏',
'${_controller.isFav.value ? '取消' : ''}收藏',
),
),
PopupMenuItem(
@@ -333,7 +325,7 @@ class _DynTopicPageState extends State<DynTopicPage> with DynMixin {
return;
}
WebViewPage.toWebView(
'https://www.bilibili.com/h5/topic-active/topic-report?topic_id=${_controller.topicId}&topic_name=${_controller.topicName}&${ThemeUtils.themeUrl(theme.isDark)}',
'https://www.bilibili.com/h5/topic-active/topic-report?topic_id=${_controller.topicId}&topic_name=${_controller.topicName}&${ThemeUtils.themeUrl(colorScheme.isDark)}',
);
},
),