2
0
mirror of https://github.com/inventree/inventree-app.git synced 2025-05-09 10:48:54 +00:00

Selectively show certain buttons in the StockItem FAB menu

This commit is contained in:
Oliver Walters 2020-04-08 12:24:32 +10:00
parent 04b09b5591
commit a64f46d79c

View File

@ -173,25 +173,28 @@ class _StockItemDisplayState extends State<StockDetailWidget> {
List<SpeedDialChild> actionButtons() {
var buttons = List<SpeedDialChild>();
buttons.add(SpeedDialChild(
child: Icon(Icons.add_circle),
label: "Add Stock",
onTap: null,
// The following actions only apply if the StockItem is not serialized
if (!item.isSerialized()) {
buttons.add(SpeedDialChild(
child: Icon(Icons.add_circle),
label: "Add Stock",
onTap: null,
)
);
);
buttons.add(SpeedDialChild(
child: Icon(Icons.remove_circle),
label: "Remove Stock",
onTap: null,
buttons.add(SpeedDialChild(
child: Icon(Icons.remove_circle),
label: "Remove Stock",
onTap: null,
),
);
);
buttons.add(SpeedDialChild(
child: Icon(Icons.check_circle),
label: "Count Stock",
onTap: null,
));
buttons.add(SpeedDialChild(
child: Icon(Icons.check_circle),
label: "Count Stock",
onTap: null,
));
}
buttons.add(SpeedDialChild(
child: Icon(Icons.location_on),