android – Sending an Image as an Argument for a Flutter Platform Channel Method

android – Sending an Image as an Argument for a Flutter Platform Channel Method

You need to convert the picked image to any of these supported types, most probably as bytes (Uint8list) to send over to the platform side.

ImagePicker would return a File, so You can call readAsBytes on it to get Uint8list. Then you can pass it via arguments of invokeMethod.

android – Sending an Image as an Argument for a Flutter Platform Channel Method

Leave a Reply

Your email address will not be published.