From caee24297b45460358f1984e4631f2d9d5820d04 Mon Sep 17 00:00:00 2001 From: AYM1607 Date: Thu, 4 Apr 2019 02:25:44 -0600 Subject: [PATCH] The bloc now uses the value from the stream to submit the new event --- lib/src/blocs/new_task_bloc.dart | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/lib/src/blocs/new_task_bloc.dart b/lib/src/blocs/new_task_bloc.dart index 4fd2959..f9dd71c 100644 --- a/lib/src/blocs/new_task_bloc.dart +++ b/lib/src/blocs/new_task_bloc.dart @@ -17,7 +17,6 @@ class NewTaskBloc { String text = ''; TaskPriority priority = TaskPriority.high; - String event = ''; //Stream getters. Observable get userModelStream => _user.stream; @@ -38,15 +37,11 @@ class NewTaskBloc { priority = newPriority; } - void setEvent(String newEvent) { - event = newEvent; - } - Future submit() { final newTask = TaskModel( text: text, priority: priority, - event: event, + event: _eventName.value, ownerUsername: _user.value.username, done: false, );