writeToFile static method

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

Implementation

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