Skip to content

Commit

Permalink
solved implementation exception
Browse files Browse the repository at this point in the history
  • Loading branch information
Oussama Maatallah authored and Oussama Maatallah committed Oct 9, 2023
1 parent c97d51e commit c15a7f2
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,11 @@ public void onMethodCall(final MethodCall call, final MethodChannel.Result rawRe
return;
}

if (call.method.equals("setImagePickerTitle")) {
this.delegate.setImagePickerTitle((String) arguments.get("title"));
return;
}

fileType = FilePickerPlugin.resolveType(call.method);
String[] allowedExtensions = null;

Expand All @@ -164,10 +169,6 @@ public void onMethodCall(final MethodCall call, final MethodChannel.Result rawRe
withData = (boolean) arguments.get("withData");
allowedExtensions = FileUtils.getMimeTypes((ArrayList<String>) arguments.get("allowedExtensions"));
}
if (call.method.equals("setImagePickerTitle")) {
this.delegate.setImagePickerTitle((String) arguments.get("title"));
return;
}
if (call.method != null && call.method.equals("custom") && (allowedExtensions == null || allowedExtensions.length == 0)) {
result.error(TAG, "Unsupported filter. Make sure that you are only using the extension without the dot, (ie., jpg instead of .jpg). This could also have happened because you are using an unsupported file extension. If the problem persists, you may want to consider using FileType.all instead.", null);
} else {
Expand Down

0 comments on commit c15a7f2

Please sign in to comment.