From 081b6aa27cf5582779b36cd55bbeebcb4b288089 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Sat, 6 Feb 2021 19:46:36 +1100 Subject: [PATCH] Remove ability to edit stock item --- lib/widget/stock_detail.dart | 41 ------------------------------------ 1 file changed, 41 deletions(-) diff --git a/lib/widget/stock_detail.dart b/lib/widget/stock_detail.dart index 14b1cf21..10bf44b2 100644 --- a/lib/widget/stock_detail.dart +++ b/lib/widget/stock_detail.dart @@ -39,18 +39,6 @@ class _StockItemDisplayState extends RefreshableState { @override String getAppBarTitle(BuildContext context) => I18N.of(context).stockItem; - @override - List getAppBarActions(BuildContext context) { - return [ - // TODO: Hide the 'edit' button if the user does not have permission!! - IconButton( - icon: FaIcon(FontAwesomeIcons.edit), - tooltip: I18N.of(context).edit, - onPressed: _editStockItemDialog, - ) - ]; - } - final TextEditingController _quantityController = TextEditingController(); final TextEditingController _notesController = TextEditingController(); @@ -72,35 +60,6 @@ class _StockItemDisplayState extends RefreshableState { await item.getTestResults(context); } - void _editStockItem() { - // TODO - Form for editing stock item - } - - void _editStockItemDialog() { - - return; - // TODO - Finish implementing this - - showDialog( - context: context, - builder: (BuildContext context) { - return AlertDialog( - title: Text("Edit Stock Item"), - actions: [ - FlatButton( - child: Text("Save"), - onPressed: () { - if (_editStockKey.currentState.validate()) { - // TODO - } - }, - ) - ], - ); - } - ); - } - void _addStock() async { Navigator.of(context).pop();