Future<void> save(File file) async { List<int> bytes = buffer.asUint8List(offsetInBytes, lengthInBytes); await file.writeAsBytes(bytes); }