Deleted the CurrentSelectionService and moved to route parameters
This commit is contained in:
parent
b39a490384
commit
dd13cebb80
9 changed files with 80 additions and 87 deletions
|
|
@ -93,11 +93,12 @@ class _HomeScreenState extends State<HomeScreen> {
|
|||
task: task,
|
||||
onDone: () => bloc.markTaskAsDone(task),
|
||||
onEventPressed: () {
|
||||
bloc.updateSelectedEvent(task);
|
||||
// Include the event name in the route.
|
||||
Navigator.of(context).pushNamed('event/${task.event}');
|
||||
},
|
||||
onEditPressed: () {
|
||||
bloc.updateSelectedTask(task);
|
||||
Navigator.of(context).pushNamed('editTask/');
|
||||
// Include the id of the task to be edited in the route.
|
||||
Navigator.of(context).pushNamed('editTask/${task.id}');
|
||||
},
|
||||
),
|
||||
padding: EdgeInsets.only(bottom: 12),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue