2
0
mirror of https://github.com/inventree/inventree-app.git synced 2025-06-12 18:25:26 +00:00

Move the "edit" button to the app bar

This commit is contained in:
Oliver Walters
2021-01-21 20:32:02 +11:00
parent c15d3a6524
commit 26cdb760eb
3 changed files with 30 additions and 8 deletions

View File

@ -11,6 +11,10 @@ abstract class RefreshableState<T extends StatefulWidget> extends State<T> {
// Storage for context once "Build" is called
BuildContext context;
List<Widget> getAppBarActions(BuildContext context) {
return [];
}
String getAppBarTitle(BuildContext context) { return "App Bar Title"; }
void initState() {
@ -37,6 +41,7 @@ abstract class RefreshableState<T extends StatefulWidget> extends State<T> {
AppBar getAppBar(BuildContext context) {
return AppBar(
title: Text(getAppBarTitle(context)),
actions: getAppBarActions(context),
);
}