Created
January 4, 2019 03:16
-
-
Save yumi0629/b6ea2febf253ad122e91697f2128efc8 to your computer and use it in GitHub Desktop.
fileToBase64
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:convert'; | |
import 'dart:io'; | |
String fileToBase64(File file){ | |
var imageByte = file.readAsBytesSync(); | |
return base64Encode(imageByte); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment