fileToBase64 static method
String base64 = await Mixins.fileToBase64(file);
Implementation
static Future<String> fileToBase64(File file) async {
try {
String base64Image = base64Encode(file.readAsBytesSync());
return base64Image;
} catch (e) {
rethrow;
}
}