Fixed App.dart

This commit is contained in:
Mariano Uvalle 2019-02-27 19:33:48 -06:00
parent 8f801b847f
commit b394a2732b

View file

@ -13,36 +13,4 @@ class App extends StatelessWidget {
), ),
); );
} }
Future<void> uploadPicture() async {
final imageTaken = await ImagePicker.pickImage(source: ImageSource.camera);
setState(() {
image = imageTaken;
});
task = provider.uploadFile(imageTaken);
}
Widget buildImage() {
if (image == null) {
return Text('No image yet');
}
return Image.file(image);
}
Widget buildFromTask() {
if (task == null) {
return Text('No task yet');
}
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();
},
);
}
} }