convertToBase64 static method

Future<String> convertToBase64(
  1. String path
)

Implementation

static Future<String> convertToBase64(String path) async {
  ByteData bytes = await rootBundle.load(path);
  var buffer = bytes.buffer;
  return base64.encode(Uint8List.view(buffer));
}