feat(recommend): 剧单更多进入两列详情页

This commit is contained in:
Zhou Weidong committed 2026-10-23 03:18:24 +08:00
1 parent f4cf7bc2dd
commit 9b1afbdb36
4 files changed
+408 -43

No files matched your search

+36 -1
View File
@@ -15,6 +15,7 @@ import '../player/open_player.dart';
import '../player/player_view.dart';
import 'recommend_types.dart';
import 'widgets/all_dramas_filter_grid.dart';
import 'widgets/playlist_detail_page.dart';
import 'widgets/recommend_sections_view.dart';
import 'widgets/recommend_top_nav.dart';
@@ -243,7 +244,41 @@ class _RecommendPageState extends State<RecommendPage> {
}
void _handleMore(RecommendSectionKind section) {
_selectTab(RecommendInnerTab.allDramas);
final l10n = AppLocalizations.of(context)!;
final copy = _sectionCopy(l10n, section);
Navigator.of(context).push<void>(
MaterialPageRoute<void>(
builder: (_) => PlaylistDetailPage(
title: copy.$1,
subtitle: copy.$2,
dramas: recommendSectionDramas(
kind: section,
source: widget.feedController.dramas,
categories: context.read<CategoryController>(),
),
),
),
);
}
(String, String) _sectionCopy(
AppLocalizations l10n,
RecommendSectionKind section,
) {
return switch (section) {
RecommendSectionKind.hits => (
l10n.weeklyHitsTitle,
l10n.weeklyHitsSubtitle,
),
RecommendSectionKind.newReleases => (
l10n.weeklyNewTitle,
l10n.weeklyNewSubtitle,
),
RecommendSectionKind.costume => (
l10n.costumeAwardsTitle,
l10n.costumeAwardsSubtitle,
),
};
}
Future<void> _openDrama(Drama drama, {String? episodeId}) async {