saveFile method

Future<File> saveFile(
  1. Uint8List fileContent
)

Implementation

Future<File> saveFile(Uint8List fileContent) async {
  assert(_path != null && _path!.isNotEmpty, 'path is empty');
  final name = 'catcher_2_${DateTime.now().microsecondsSinceEpoch}.png';
  final file = await File('$_path/$name').create(recursive: true);
  file.writeAsBytesSync(fileContent);
  return file;
}