Storage
This commit is contained in:
parent
9992e26264
commit
6e3d02d04b
1 changed files with 11 additions and 3 deletions
|
|
@ -56,9 +56,17 @@ class AppState extends State<App> {
|
|||
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<StorageTaskEvent> snapshot) {
|
||||
if (!snapshot.hasData) {
|
||||
return Text('No task yet');
|
||||
} else if (task.isComplete) {
|
||||
return Icon(Icons.check);
|
||||
}
|
||||
return CircularProgressIndicator();
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue