Added methods to allow the new task screen to update the blocs properties
This commit is contained in:
parent
2c42d3c4a2
commit
4db0ab4e53
1 changed files with 17 additions and 1 deletions
|
|
@ -6,4 +6,20 @@ import '../models/task_model.dart';
|
|||
import '../resources/authService.dart';
|
||||
import '../resources/firestore_provider.dart';
|
||||
|
||||
class NewTaskBloc {}
|
||||
class NewTaskBloc {
|
||||
final AuthService _auth = authService;
|
||||
FirebaseUser currentUser;
|
||||
|
||||
String text;
|
||||
TaskPriority priority;
|
||||
String event;
|
||||
|
||||
NewTaskBloc() {
|
||||
setCurrentUser();
|
||||
}
|
||||
|
||||
Future<void> setCurrentUser() async {
|
||||
final user = await _auth.currentUser;
|
||||
currentUser = user;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue