mirror of
https://github.com/HendrikRauh/inventree-app.git
synced 2026-01-13 11:36:24 +00:00
Move the "edit" button to the app bar
This commit is contained in:
parent
c15d3a6524
commit
26cdb760eb
3 changed files with 30 additions and 8 deletions
|
|
@ -37,6 +37,18 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> {
|
|||
@override
|
||||
String getAppBarTitle(BuildContext context) { return "Stock Item"; }
|
||||
|
||||
@override
|
||||
List<Widget> getAppBarActions(BuildContext context) {
|
||||
return <Widget>[
|
||||
// TODO: Hide the 'edit' button if the user does not have permission!!
|
||||
IconButton(
|
||||
icon: FaIcon(FontAwesomeIcons.edit),
|
||||
tooltip: "Edit",
|
||||
onPressed: _editStockItemDialog,
|
||||
)
|
||||
];
|
||||
}
|
||||
|
||||
final TextEditingController _quantityController = TextEditingController();
|
||||
final TextEditingController _notesController = TextEditingController();
|
||||
|
||||
|
|
@ -333,10 +345,6 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> {
|
|||
title: Text("${item.partName}"),
|
||||
subtitle: Text("${item.partDescription}"),
|
||||
leading: InvenTreeAPI().getImage(item.partImage),
|
||||
trailing: IconButton(
|
||||
icon: FaIcon(FontAwesomeIcons.edit),
|
||||
onPressed: _editStockItemDialog,
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue