Closed c0c4i closed 3 years ago
Hi, image is returned as ByteData
so you need to get raw data firstly -> ByteData.buffer.asUint8List()
, then u can use dart:convert
package to convert to base64 string.
A little example here:
import 'dart:convert';
final control = HandSignatureControl();
final image = await control.getImage();
final rawData = image.buffer.asUint8List();
final base64String = base64Encode(rawData);
Thank you a lot for the solution 👍🏻
Hello, I'm trying to convert signature to base64 but from toImage() I'm not able to convert to base64. I don't know if there is a workaround that permit that. Thank you 👍🏻