diff --git a/lib/widget/stock_detail.dart b/lib/widget/stock_detail.dart index b770d89f..407dc5f3 100644 --- a/lib/widget/stock_detail.dart +++ b/lib/widget/stock_detail.dart @@ -173,25 +173,28 @@ class _StockItemDisplayState extends State { List actionButtons() { var buttons = List(); - 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),