fixing weird CupertinoPicker
This commit is contained in:
parent
8bdc413eab
commit
2734131f08
1 changed files with 10 additions and 9 deletions
|
@ -101,19 +101,20 @@ class ReceiptPage2State extends State<ReceiptPage2> {
|
|||
}
|
||||
|
||||
List<String> _sampleRecurringOptions = new List<String>(7);
|
||||
List<String> _categories = new List<String>();
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
||||
Future<List<String>> _futureCats = getCats();
|
||||
List<String> _categories = new List<String>();
|
||||
_categories.add("Fetching categories...");
|
||||
|
||||
_futureCats.then((value) {
|
||||
_categories = null;
|
||||
_categories = value;
|
||||
setState(() {});
|
||||
});
|
||||
if (_categories.length == 0) {
|
||||
Future<List<String>> _futureCats = getCats();
|
||||
_categories.add("Fetching categories...");
|
||||
_futureCats.then((value) {
|
||||
_categories = null;
|
||||
_categories = value;
|
||||
setState(() {});
|
||||
});
|
||||
}
|
||||
|
||||
_sampleRecurringOptions[0] = "None";
|
||||
_sampleRecurringOptions[1] = "Daily";
|
||||
|
|
Reference in a new issue