migrate chatty

This commit is contained in:
Salvatore Giordano
2021-05-18 17:15:37 +02:00
parent 33622093e0
commit bc655e0dc4
27 changed files with 181 additions and 159 deletions
@@ -4,10 +4,17 @@ import 'package:stream_chatter/data/image_picker_repository.dart';
class ImagePickerImpl extends ImagePickerRepository {
@override
Future<File> pickImage() async {
Future<File?> pickImage() async {
final picker = ImagePicker();
final pickedFile =
await picker.getImage(source: ImageSource.gallery, maxWidth: 400);
final pickedFile = await picker.getImage(
source: ImageSource.gallery,
maxWidth: 400,
);
if (pickedFile == null) {
return null;
}
return File(pickedFile.path);
}
}