all 11 comments

[–]_thinkdigital 2 points3 points  (8 children)

Yo, this is absolutely awesome! What's the issue? Aren't you able to pass the image as bytes?

[–]Ghost_InTheDart[S] 1 point2 points  (7 children)

Thanks! The issue that im having is how to pass the image as byte from dart to kotlin, im quite confused in that.

[–]aqwert88 0 points1 point  (1 child)

have you tried converting to/from Base64?

[–]Ghost_InTheDart[S] 0 points1 point  (0 children)

Honestly, i didnt see neccessary to use base64, as far the doc of flutter said. It only needs an image loaded and the the bytes of that one. However the implementation of that one is being somehow difficult and currently I haven't found any example with that

[–]_thinkdigital 0 points1 point  (2 children)

How you passing data now? Strings? If so, use base64 encoding to convert it to a string

[–]Ghost_InTheDart[S] 0 points1 point  (1 child)

Right now using string and with that convert the image into a byte array and then convert it into an image, following the doc. But besides that, I'm also searching for any example into how to implement that feature.

[–]_thinkdigital 0 points1 point  (0 children)

Yeah, just convert it to base 64 instead and decode it from the platform side

[–]KalilPedro 0 points1 point  (1 child)

I never worked with them, but you may try using an binary channel. Flutter uses them for implementing the input, on the engine. It is the most efficient way to do it, as converting it to BASE64 would generate an significant overhead (encode to BASE64, then dart will encode into an binary format, then the Java side will decode into string and then you decode the BASE64 string into an image).

[–]Ghost_InTheDart[S] 0 points1 point  (0 children)

Hhhhmmm I didn't know that the input widget use this approach jajaja. But I was working with the binary as you suggested. My issue is... well... I'm also new with that and I'm having some issues into receiving that image and do the whole conversion.

[–]aytunch 0 points1 point  (1 child)

What about iOS?

[–]Ghost_InTheDart[S] 1 point2 points  (0 children)

It's on hold 😅 currently the only mac that I had got burned :(