instance property

MacMenuBarPlatform get instance

Returns the current platform instance.

This getter returns the current platform implementation, which defaults to MethodChannelMacMenuBar.

Implementation

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

Sets the platform instance that will be used by the plugin.

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

Throws an AssertionError if the provided instance does not extend MacMenuBarPlatform.

Implementation

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