fix(player): 保持推荐页返回时播放状态
This commit is contained in:
1 parent
2a32dec183
commit
ab4c246675
2 files changed
+48
-1
No files matched your search
@@ -46,11 +46,15 @@ class RecommendPage extends StatefulWidget {
|
||||
State<RecommendPage> createState() => _RecommendPageState();
|
||||
}
|
||||
|
||||
class _RecommendPageState extends State<RecommendPage> {
|
||||
class _RecommendPageState extends State<RecommendPage>
|
||||
with AutomaticKeepAliveClientMixin<RecommendPage> {
|
||||
RecommendInnerTab _tab = RecommendInnerTab.feed;
|
||||
final PageController _pageController = PageController();
|
||||
int _scrubCancelRequest = 0;
|
||||
|
||||
@override
|
||||
bool get wantKeepAlive => true;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
@@ -85,6 +89,7 @@ class _RecommendPageState extends State<RecommendPage> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
super.build(context);
|
||||
final categories = context.read<CategoryController>();
|
||||
return ColoredBox(
|
||||
key: const Key('recommend-page'),
|
||||
|
||||
Reference in new issue
Block a user