From 0570147b3104eb329207ff374541d9d6797fe427 Mon Sep 17 00:00:00 2001 From: davidpkj Date: Sat, 11 Mar 2023 17:54:46 +0100 Subject: Updated code to dart analysis recommendations --- lib/views/shoplist_view.dart | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'lib/views/shoplist_view.dart') diff --git a/lib/views/shoplist_view.dart b/lib/views/shoplist_view.dart index 35332bc..638dc1b 100644 --- a/lib/views/shoplist_view.dart +++ b/lib/views/shoplist_view.dart @@ -70,11 +70,11 @@ class ShoplistViewState extends State { title: Text(ShoplistData.shoplist[index]), ), onDismissed: (_) { - String _content = AppLocalizations.of(context)!.removed; - String _actionLabel = AppLocalizations.of(context)!.undo; + String content = AppLocalizations.of(context)!.removed; + String actionLabel = AppLocalizations.of(context)!.undo; _removeItem(index); - ToastBar.showToastBar(context, _content, actionLabel: _actionLabel, actionCallback: () => _addItem(ShoplistData.removed.removeLast())); + ToastBar.showToastBar(context, content, actionLabel: actionLabel, actionCallback: () => _addItem(ShoplistData.removed.removeLast())); }, ), ); @@ -118,12 +118,12 @@ class ShoplistViewState extends State { focusNode: _focusNode, textInputAction: TextInputAction.done, onEditingComplete: () { - String _text = _controller.text.trim(); + String text = _controller.text.trim(); _closeInput(); _controller.clear(); - if (_text != "") _addItem(_text); + if (text != "") _addItem(text); }, ), ), -- cgit v1.2.3