Initial and done prolly
This commit is contained in:
commit
6f88b9966f
175 changed files with 15445 additions and 0 deletions
17
lib/services/db_service.dart
Normal file
17
lib/services/db_service.dart
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
import 'package:get/get.dart';
|
||||
import 'package:groceries_manager/db/database.dart';
|
||||
|
||||
class DBService extends GetxService {
|
||||
static DBService get to => Get.find();
|
||||
|
||||
late final AppDatabase db;
|
||||
|
||||
DBService();
|
||||
|
||||
Future<void> init() async {
|
||||
db = AppDatabase();
|
||||
await db.doWhenOpened((_) {
|
||||
print("Database loaded");
|
||||
});
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue