saveBytes function

Future<void> saveBytes({
  1. required String printName,
  2. required String fileType,
  3. required Uint8List bytes,
  4. required String path,
  5. bool isBytes = true,
})

Save file as bytes to location

Implementation

Future<void> saveBytes({
  required String printName,
  required String fileType,
  required Uint8List bytes,
  required String path,
  bool isBytes = true
}) async {
  await File('$path/$printName.$fileType').writeAsBytes(bytes);
}