static Future<File?> writeAsBytes(String path, Uint8List data) async { try { File file = File(path); file = await file.writeAsBytes(data); return file; } catch (e) { return null; } }