decodeBase64 function

File decodeBase64(
  1. String img64,
  2. String imageType
)

Implementation

File decodeBase64(String img64, String imageType) {
  final decodedBytes = base64Decode(img64);
  String filename = getRandString(10);
  var file = Io.File("assets/$imageType/$filename.png");
  file.writeAsBytesSync(decodedBytes);

  return file;
}