base64EncodeFile static method

Future<String> base64EncodeFile(
  1. File file
)

文件转 base64

Implementation

static Future<String> base64EncodeFile(File file) async {
  List<int> bytes = await file.readAsBytes();
  return base64.encode(bytes);
}