instance property

The default instance of AndroidGlideViewPlatform to use.

Defaults to MethodChannelAndroidGlideView for Android platform support. This instance handles all communication between Flutter and the native Android code.

Implementation

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

Sets the platform implementation instance.

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

This method includes verification to ensure that:

  • The provided instance is not null
  • The instance uses the correct token
  • Only one implementation is active at a time

Parameters:

  • instance: The platform-specific implementation to use

Implementation

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