update
This commit is contained in:
parent
87d8bb483e
commit
17a1430ef0
11 changed files with 271 additions and 25 deletions
|
|
@ -1,4 +1,5 @@
|
|||
import 'package:supabase_flutter/supabase_flutter.dart';
|
||||
import 'package:uuid/uuid.dart';
|
||||
|
||||
class RefCategories {
|
||||
final SupabaseClient _supabase = Supabase.instance.client;
|
||||
|
|
@ -17,4 +18,9 @@ class RefCategories {
|
|||
final data = await _supabase.from('ref_categories').select('category_name').eq('ref_categories_uuid', uuid);
|
||||
return data.first['category_name'];
|
||||
}
|
||||
|
||||
Future<void> postCategory(String name) async {
|
||||
final categoryUUID = Uuid().v4();
|
||||
await _supabase.from('ref_categories').insert({'ref_categories_uuid': categoryUUID, 'category_name': name});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue