flutter图片转base64【转】
void getImageByGallery(index)async{
ImagePicker.pickImage(source: ImageSource.gallery).then((value)async{
List bytes =await value.readAsBytes();
String bs64 = base64Encode(bytes);
String bs64Image ="data:image/png;base64,"+bs64;
print(bs64Image);
});