fix(flutter): 首页 feed 去底色并优化整集条
This commit is contained in:
1 parent
f94926cff5
commit
636b369bd4
6 files changed
+171
-97
No files matched your search
@@ -3,6 +3,7 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
import '../../core/data/models/drama.dart';
|
||||
@@ -32,10 +33,7 @@ class HomePage extends StatelessWidget {
|
||||
final l10n = AppLocalizations.of(context)!;
|
||||
return Theme(
|
||||
data: AppTheme.light(),
|
||||
child: DecoratedBox(
|
||||
decoration: const BoxDecoration(gradient: AppTheme.pageGradient),
|
||||
child: _buildHome(context, catalog, l10n),
|
||||
),
|
||||
child: _buildHome(context, catalog, l10n),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -136,7 +134,8 @@ class _HomeTabsState extends State<_HomeTabs> {
|
||||
|
||||
Widget _scaffold(BuildContext context) {
|
||||
final l10n = AppLocalizations.of(context)!;
|
||||
return PopScope(
|
||||
final feed = logic.tab == 0;
|
||||
final content = PopScope(
|
||||
canPop: false,
|
||||
onPopInvokedWithResult: (didPop, _) {
|
||||
if (didPop) return;
|
||||
@@ -144,11 +143,21 @@ class _HomeTabsState extends State<_HomeTabs> {
|
||||
},
|
||||
child: Scaffold(
|
||||
key: logic.scaffoldKey,
|
||||
backgroundColor: logic.tab == 0 ? Colors.black : Colors.transparent,
|
||||
backgroundColor: Colors.transparent,
|
||||
body: _body(context),
|
||||
bottomNavigationBar: logic.videoImmersive ? null : _nav(context, l10n),
|
||||
),
|
||||
);
|
||||
return AnnotatedRegion<SystemUiOverlayStyle>(
|
||||
value: feed ? SystemUiOverlayStyle.light : SystemUiOverlayStyle.dark,
|
||||
child: feed
|
||||
? content
|
||||
: DecoratedBox(
|
||||
key: const Key('home-page-gradient'),
|
||||
decoration: const BoxDecoration(gradient: AppTheme.pageGradient),
|
||||
child: content,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _body(BuildContext context) {
|
||||
|
||||
Reference in new issue
Block a user