diff --git a/lib/src/App.dart b/lib/src/App.dart index 794465e..955d9d8 100644 --- a/lib/src/App.dart +++ b/lib/src/App.dart @@ -56,9 +56,17 @@ class AppState extends State { Widget buildFromTask() { if (task == null) { return Text('No task yet'); - } else if (task.isComplete) { - return Icon(Icons.check); } - return CircularProgressIndicator(); + return StreamBuilder( + stream: task.events, + builder: (context, AsyncSnapshot snapshot) { + if (!snapshot.hasData) { + return Text('No task yet'); + } else if (task.isComplete) { + return Icon(Icons.check); + } + return CircularProgressIndicator(); + }, + ); } }