fixed app bar layout

This commit is contained in:
Thibault Deckers 2020-09-09 21:33:36 +09:00
parent 3d63453f9d
commit 23e0d634e4
3 changed files with 8 additions and 8 deletions

View file

@ -155,7 +155,7 @@ class _CollectionAppBarState extends State<CollectionAppBar> with SingleTickerPr
}
return TappableAppBarTitle(
onTap: _goToSearch,
title: title,
child: title,
);
} else if (collection.isSelecting) {
return AnimatedBuilder(

View file

@ -2,11 +2,11 @@ import 'package:flutter/material.dart';
class TappableAppBarTitle extends StatelessWidget {
final GestureTapCallback onTap;
final Widget title;
final Widget child;
const TappableAppBarTitle({
this.onTap,
@required this.title,
@required this.child,
});
@override
@ -20,7 +20,7 @@ class TappableAppBarTitle extends StatelessWidget {
padding: EdgeInsets.symmetric(horizontal: NavigationToolbar.kMiddleSpacing),
color: Colors.transparent,
height: kToolbarHeight,
child: title,
child: child,
),
);
}

View file

@ -42,12 +42,12 @@ class FilterNavigationPage extends StatelessWidget {
return FilterGridPage(
source: source,
appBar: SliverAppBar(
title: SourceStateAwareAppBarTitle(
title: TappableAppBarTitle(
onTap: () => _goToSearch(context),
title: TappableAppBarTitle(
onTap: () => _goToSearch(context),
child: SourceStateAwareAppBarTitle(
title: Text(title),
source: source,
),
source: source,
),
actions: [
SearchButton(source),