implementing categories submit
This commit is contained in:
parent
a7db1c528b
commit
fc2add5636
4 changed files with 24 additions and 67 deletions
|
@ -1,25 +0,0 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:local_spend/common/apifunctions/categories.dart';
|
||||
import 'dart:async';
|
||||
|
||||
Future<List<DropdownMenuItem>> getDropDownItems(String type) async {
|
||||
List<DropdownMenuItem<String>> items = new List<DropdownMenuItem<String>>();
|
||||
|
||||
// if (type == "categories") {
|
||||
var categories = await getCategories();
|
||||
|
||||
categories.forEach((thisValue) {
|
||||
items.add(
|
||||
new DropdownMenuItem(
|
||||
child: new Text(thisValue.name),
|
||||
value: thisValue.index,
|
||||
key: Key(thisValue.index),
|
||||
),
|
||||
);
|
||||
});
|
||||
|
||||
print("oof");
|
||||
|
||||
return items;
|
||||
// }
|
||||
}
|
Reference in a new issue