instance property

The default instance of LargeFileHandlerPlatform to use.

On platforms with dart:io this defaults to MethodChannelLargeFileHandler; on web the platform implementation registers itself before first use.

Implementation

static LargeFileHandlerPlatform get instance {
  final instance = _instance ??= buildDefaultInstance();
  if (instance == null) {
    throw StateError(
      'LargeFileHandlerPlatform.instance has not been set. '
      'Ensure the platform plugin is registered before use.',
    );
  }
  return instance;
}
set instance (LargeFileHandlerPlatform instance)

Platform-specific implementations should set this with their own platform-specific class that extends LargeFileHandlerPlatform when they register themselves.

Implementation

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