Fixed a bug where all the thumnails where the same as the first one in the firebase function

This commit is contained in:
Mariano Uvalle 2019-04-07 19:08:18 -05:00
parent f438df4432
commit 2b6ef23ab9
3 changed files with 11 additions and 4 deletions

View file

@ -34,7 +34,7 @@ class FirebaseStorageProvider {
_storage.child('$folder$fileId.$type');
return fileReference.putFile(
file,
StorageMetadata(contentType: 'image'),
StorageMetadata(contentType: 'image/png'),
);
}

View file

@ -140,12 +140,14 @@ class _NewImageScreenState extends State<NewImageScreen> {
Navigator.of(context).pop();
}
// TODO: Pro users can save their pictures in full res.
/// Prompts the user to take a picture.
///
/// Updates the file in the bloc.
Future<void> takePicture() async {
final File imgFile = await ImagePicker.pickImage(
source: ImageSource.camera,
maxWidth: 1500,
);
bloc.changePicture(imgFile);
}