saveFile method

Future<File> saveFile(
  1. Uint8List fileContent
)

Implementation

Future<File> saveFile(Uint8List fileContent) async {
  final name = "tracker_${DateTime.now().microsecondsSinceEpoch}.png";
  final File file = await File("$_path/$name").create(recursive: true);
  file.writeAsBytesSync(fileContent);
  return file;
}