readFileDataAsBase64 function

Future<String?> readFileDataAsBase64(
  1. File file
)

Reads file as Base64 String.

Implementation

Future<String?> readFileDataAsBase64(File file) async {
  var data = await readFileDataAsArrayBuffer(file);
  return data != null ? data_convert.base64.encode(data) : null;
}