Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

data should be nullable #19

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Gazer
Copy link

@Gazer Gazer commented May 3, 2020

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```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant