This commit is contained in:
Patrick Alvin Alcala 2025-01-28 17:14:43 +08:00
parent f87e1511bc
commit e48e400e43
13 changed files with 333 additions and 33 deletions

View file

@ -22,9 +22,10 @@ class AddGenericsPageState extends State<AddGenericsPage> {
final _refCategories = RefCategories();
final _refGenericNames = RefGenericNames();
final _nameController = TextEditingController();
late List _categoryList;
late String _selectedCategory;
late String _categoryUUID;
late List _categoryList = [];
late String _selectedCategory = '';
late String _categoryUUID = '';
@override
void initState() {
@ -43,7 +44,6 @@ class AddGenericsPageState extends State<AddGenericsPage> {
void saveGeneric() async {
_categoryUUID = await _refCategories.getUUID(_selectedCategory);
log(_categoryUUID);
await _refGenericNames.postGeneric(_nameController.text, _categoryUUID);
}