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);

});

来源:https://www.jianshu.com/p/c0cd1b521b20

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-13
  • 2021-10-10
  • 2021-12-23
  • 2021-11-03
  • 2021-10-12
猜你喜欢
  • 2021-09-13
  • 2022-12-23
  • 2022-01-07
  • 2021-08-30
  • 2021-11-09
  • 2022-12-23
相关资源
相似解决方案