fixed app bar layout
This commit is contained in:
parent
3d63453f9d
commit
23e0d634e4
3 changed files with 8 additions and 8 deletions
|
@ -155,7 +155,7 @@ class _CollectionAppBarState extends State<CollectionAppBar> with SingleTickerPr
|
||||||
}
|
}
|
||||||
return TappableAppBarTitle(
|
return TappableAppBarTitle(
|
||||||
onTap: _goToSearch,
|
onTap: _goToSearch,
|
||||||
title: title,
|
child: title,
|
||||||
);
|
);
|
||||||
} else if (collection.isSelecting) {
|
} else if (collection.isSelecting) {
|
||||||
return AnimatedBuilder(
|
return AnimatedBuilder(
|
||||||
|
|
|
@ -2,11 +2,11 @@ import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class TappableAppBarTitle extends StatelessWidget {
|
class TappableAppBarTitle extends StatelessWidget {
|
||||||
final GestureTapCallback onTap;
|
final GestureTapCallback onTap;
|
||||||
final Widget title;
|
final Widget child;
|
||||||
|
|
||||||
const TappableAppBarTitle({
|
const TappableAppBarTitle({
|
||||||
this.onTap,
|
this.onTap,
|
||||||
@required this.title,
|
@required this.child,
|
||||||
});
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
@ -20,7 +20,7 @@ class TappableAppBarTitle extends StatelessWidget {
|
||||||
padding: EdgeInsets.symmetric(horizontal: NavigationToolbar.kMiddleSpacing),
|
padding: EdgeInsets.symmetric(horizontal: NavigationToolbar.kMiddleSpacing),
|
||||||
color: Colors.transparent,
|
color: Colors.transparent,
|
||||||
height: kToolbarHeight,
|
height: kToolbarHeight,
|
||||||
child: title,
|
child: child,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,12 +42,12 @@ class FilterNavigationPage extends StatelessWidget {
|
||||||
return FilterGridPage(
|
return FilterGridPage(
|
||||||
source: source,
|
source: source,
|
||||||
appBar: SliverAppBar(
|
appBar: SliverAppBar(
|
||||||
title: SourceStateAwareAppBarTitle(
|
title: TappableAppBarTitle(
|
||||||
title: TappableAppBarTitle(
|
onTap: () => _goToSearch(context),
|
||||||
onTap: () => _goToSearch(context),
|
child: SourceStateAwareAppBarTitle(
|
||||||
title: Text(title),
|
title: Text(title),
|
||||||
|
source: source,
|
||||||
),
|
),
|
||||||
source: source,
|
|
||||||
),
|
),
|
||||||
actions: [
|
actions: [
|
||||||
SearchButton(source),
|
SearchButton(source),
|
||||||
|
|
Loading…
Reference in a new issue