avoid app bar color changes when scrolling
This commit is contained in:
+12
-4
@@ -111,11 +111,13 @@ class BrowserBottomAppBar extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final bottomPadding = MediaQuery.of(context).padding.bottom;
|
||||
final colorScheme = Theme.of(context).colorScheme;
|
||||
|
||||
return Material(
|
||||
elevation: 3.0,
|
||||
surfaceTintColor: Theme.of(context).colorScheme.surfaceTint,
|
||||
color: Theme.of(context).colorScheme.surfaceContainer,
|
||||
elevation: 0,
|
||||
shadowColor: Colors.transparent,
|
||||
surfaceTintColor: Colors.transparent,
|
||||
color: colorScheme.surfaceContainer,
|
||||
child: Padding(
|
||||
padding: EdgeInsets.only(bottom: bottomPadding),
|
||||
child: SizedBox(height: _size.height, child: _tabBar),
|
||||
@@ -343,6 +345,8 @@ class BrowserTabBarView extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final colorScheme = Theme.of(context).colorScheme;
|
||||
|
||||
return GestureDetector(
|
||||
// Tap handling moved to AppBarTitle for split icon/title behavior
|
||||
onHorizontalDragStart: onHorizontalDragStart,
|
||||
@@ -365,10 +369,14 @@ class BrowserTabBarView extends StatelessWidget {
|
||||
child: AppBar(
|
||||
primary: false,
|
||||
automaticallyImplyLeading: false,
|
||||
backgroundColor:
|
||||
backgroundColor ?? colorScheme.surfaceContainer,
|
||||
scrolledUnderElevation: 0,
|
||||
shadowColor: Colors.transparent,
|
||||
surfaceTintColor: Colors.transparent,
|
||||
titleSpacing: 0.0,
|
||||
leadingWidth: 40.0,
|
||||
toolbarHeight: kToolbarHeight,
|
||||
backgroundColor: backgroundColor,
|
||||
title: title,
|
||||
actions: actions,
|
||||
),
|
||||
|
||||
@@ -83,6 +83,7 @@ class SearchScreen extends HookConsumerWidget {
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final appColors = AppColors.of(context);
|
||||
final colorScheme = Theme.of(context).colorScheme;
|
||||
final formKey = useMemoized(() => GlobalKey<FormState>());
|
||||
|
||||
final createChildTabsOption = ref.watch(
|
||||
@@ -454,6 +455,10 @@ class SearchScreen extends HookConsumerWidget {
|
||||
floating: true,
|
||||
pinned: true,
|
||||
automaticallyImplyLeading: false,
|
||||
backgroundColor: colorScheme.surface,
|
||||
scrolledUnderElevation: 0,
|
||||
shadowColor: Colors.transparent,
|
||||
surfaceTintColor: Colors.transparent,
|
||||
toolbarHeight: isEditMode ? 0 : kToolbarHeight,
|
||||
titleSpacing: 0.0,
|
||||
title: isEditMode
|
||||
|
||||
Reference in New Issue
Block a user