The bloc now uses the value from the stream to submit the new event
This commit is contained in:
parent
bc51a48b6a
commit
caee24297b
1 changed files with 1 additions and 6 deletions
|
|
@ -17,7 +17,6 @@ class NewTaskBloc {
|
|||
|
||||
String text = '';
|
||||
TaskPriority priority = TaskPriority.high;
|
||||
String event = '';
|
||||
|
||||
//Stream getters.
|
||||
Observable<UserModel> get userModelStream => _user.stream;
|
||||
|
|
@ -38,15 +37,11 @@ class NewTaskBloc {
|
|||
priority = newPriority;
|
||||
}
|
||||
|
||||
void setEvent(String newEvent) {
|
||||
event = newEvent;
|
||||
}
|
||||
|
||||
Future<void> submit() {
|
||||
final newTask = TaskModel(
|
||||
text: text,
|
||||
priority: priority,
|
||||
event: event,
|
||||
event: _eventName.value,
|
||||
ownerUsername: _user.value.username,
|
||||
done: false,
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue