Added Provider and DetailPage

This commit is contained in:
marcoabat committed 2023-08-05 14:35:19 +02:00
1 parent 77e1fa8244
commit 64e680ec6f
7 files changed
+104 -4

No files matched your search

+12
View File
@@ -0,0 +1,12 @@
import 'package:flutter/material.dart';
class ChecklistProvider extends ChangeNotifier {
int? _selectedChecklistId;
updateSelectedChecklist(int? checklistId, {bool silent = false}) {
_selectedChecklistId = checklistId;
if (!silent) notifyListeners();
}
int? get selectedChecklistId => _selectedChecklistId;
}
+4
View File
@@ -34,6 +34,10 @@ class DbHelper {
return 0;
}
static Future<Checklist> getChecklistById(int id) async {
return ed.checklists.first;
}
static Stream<AuthState> get authChangeEventStream =>
_client.auth.onAuthStateChange;
}