christian_picker_image
christian_picker_image copied to clipboard
data should be nullable
When used in combination with other plugins that open activities, on Android, there is a crash because the data parameter should be nullable.
This can be reproduced using the image_cropper after picking an image:
List<File> images = await ChristianPickerImage.pickImages(maxImages: 1);
if (images.length > 0) {
var selectedImage = images.first;
File croppedFile = await ImageCropper.cropImage(...);
}
If you cancel the crop, onActivityResult is called for this plugin with a null data Intent:
Caused by: java.lang.IllegalArgumentException: Parameter specified as non-null is null: method kotlin.jvm.internal.Intrinsics.checkParameterIsNotNull, parameter data
at com.christian.christian_picker_image.ChristianPickerImagePlugin.onActivityResult(Unknown Source:2)
at io.flutter.embedding.engine.FlutterEnginePluginRegistry$FlutterEngineActivityPluginBinding.onActivityResult(FlutterEnginePluginRegistry```