saveImage static method
Implementation
static Future<String> saveImage(Uint8List byteData) async {
final directory = (await getTemporaryDirectory()).path;
String path = '$directory/${DateTime.now().millisecondsSinceEpoch}.png';
final imgFile = File(path);
try {
await imgFile.writeAsBytes(byteData);
LogTool.log('saveSuccess:$path');
} catch (_) {
path = '';
}
return Future.value(path);
}