Google is committed to advancing racial equity for Black communities. See how.

VmoFile.readOnly constructor

VmoFile.readOnly(Vmo _vmo, VmoSharingMode _sharingMode)

Constructor for read-only Vmo

Implementation

VmoFile.readOnly(this._vmo, this._sharingMode)
    : assert(_vmo != null),
      super.readOnly(() {
        int size = _vmo.getSize().size;
        return _vmo.read(size).bytesAsUint8List();
      }) {
  if (_vmo == null) {
    throw Exception('Vmo cannot be null');
  }
}