getImageFileFromAssets static method
Implementation
static Future<File> getImageFileFromAssets(ByteData byteData) async {
final file = File(
'${(await getAppDirectory()).path}${DateTime.now().millisecond}.jpg',
);
await file.writeAsBytes(byteData.buffer.asUint8List(byteData.offsetInBytes, byteData.lengthInBytes));
return file;
}