writeToFile static method
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)
);
}