writeToFile static method

Future<void> writeToFile(
  1. ByteData data,
  2. String path
)

The method does not return any value explicitly (hence Future

Implementation

static Future<void> writeToFile(ByteData data, String path) async {
  final buffer = data.buffer;
  await File(path).writeAsBytes(
      buffer.asUint8List(data.offsetInBytes, data.lengthInBytes)
  );
}