diff --git a/lib/pages/receipt_page_2.dart b/lib/pages/receipt_page_2.dart index 897be0b..e064039 100644 --- a/lib/pages/receipt_page_2.dart +++ b/lib/pages/receipt_page_2.dart @@ -101,19 +101,20 @@ class ReceiptPage2State extends State { } List _sampleRecurringOptions = new List(7); + List _categories = new List(); @override Widget build(BuildContext context) { - Future> _futureCats = getCats(); - List _categories = new List(); - _categories.add("Fetching categories..."); - - _futureCats.then((value) { - _categories = null; - _categories = value; - setState(() {}); - }); + if (_categories.length == 0) { + Future> _futureCats = getCats(); + _categories.add("Fetching categories..."); + _futureCats.then((value) { + _categories = null; + _categories = value; + setState(() {}); + }); + } _sampleRecurringOptions[0] = "None"; _sampleRecurringOptions[1] = "Daily";