fix(flutter): 剧场与榜单卡片直接进播放页
This commit is contained in:
1 parent
04a1a4ee82
commit
720fd26935
6 files changed
+72
-47
No files matched your search
@@ -1,5 +1,7 @@
|
||||
// Author: fruit.com.cn
|
||||
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
@@ -8,7 +10,7 @@ import '../../core/widgets/empty_state.dart';
|
||||
import '../../core/widgets/plain_page_scaffold.dart';
|
||||
import '../../l10n/app_localizations.dart';
|
||||
import '../discover/widgets/drama_grid.dart';
|
||||
import '../drama_detail/drama_detail_view.dart';
|
||||
import '../player/open_player.dart';
|
||||
|
||||
/// 剧场新剧页:按 id 倒序展示最新上架短剧。
|
||||
class NewReleasesPage extends StatelessWidget {
|
||||
@@ -31,11 +33,8 @@ class NewReleasesPage extends StatelessWidget {
|
||||
child: DramaGrid(
|
||||
l10n: l10n,
|
||||
dramas: dramas,
|
||||
onOpen: (drama) => Navigator.of(context).push<void>(
|
||||
MaterialPageRoute(
|
||||
builder: (_) => DramaDetailPage(drama: drama),
|
||||
),
|
||||
),
|
||||
onOpen: (drama) =>
|
||||
unawaited(playDramaFromCatalog(context, drama)),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user