2
0
mirror of https://github.com/inventree/inventree-app.git synced 2025-06-14 11:15:26 +00:00

Allow search widget to be constructed with or without an app bar

This commit is contained in:
Oliver Walters
2022-05-04 10:42:33 +10:00
parent b6a5af08d8
commit a3597c5d61
4 changed files with 31 additions and 11 deletions

View File

@ -80,6 +80,14 @@ abstract class RefreshableState<T extends StatefulWidget> extends State<T> {
return null;
}
AppBar? buildAppBar(BuildContext context) {
return AppBar(
title: Text(getAppBarTitle(context)),
actions: getAppBarActions(context),
leading: backButton(context, refreshableKey),
);
}
@override
Widget build(BuildContext context) {
@ -88,11 +96,7 @@ abstract class RefreshableState<T extends StatefulWidget> extends State<T> {
return Scaffold(
key: refreshableKey,
appBar: AppBar(
title: Text(getAppBarTitle(context)),
actions: getAppBarActions(context),
leading: backButton(context, refreshableKey),
),
appBar: buildAppBar(context),
drawer: getDrawer(context),
floatingActionButton: getFab(context),
body: Builder(