instance property

ZstandardPlatform get instance

The default instance of ZstandardPlatform to use.

Defaults to MethodChannelZstandardPlatform. Platform packages set this in their registerWith() (or equivalent) so the main plugin uses the native implementation.

Implementation

static ZstandardPlatform get instance => _instance;
set instance (ZstandardPlatform instance)

Sets the platform implementation.

Only instances created with the correct token (from this package) can be set. Platform-specific implementations call this when they register.

Implementation

static set instance(ZstandardPlatform instance) {
  PlatformInterface.verifyToken(instance, _token);
  _instance = instance;
}