check image for null safety

This commit is contained in:
tzw
2021-09-10 16:48:24 +06:30
parent 1bbff6e4cd
commit 3dde95f23f
5 changed files with 42 additions and 30 deletions

View File

@@ -7,7 +7,7 @@ import 'local_text.dart';
typedef OnFile = void Function(File);
modelBottomSheet(BuildContext context, {final OnFile onFile}) {
modelBottomSheet(BuildContext context, {final OnFile? onFile}) {
showModalBottomSheet(
elevation: 10,
backgroundColor: Colors.white,
@@ -84,7 +84,7 @@ class _ImageFileState extends State<ImageFile> {
}
pickImage(ImageSource source) async {
var tempImage = await ImagePicker.pickImage(source: source);
var tempImage = await ImagePicker().pickImage(source: source);
return tempImage;
}
}