instance property

NutrientFlutterPlatform? get instance

The registered platform implementation, or null if none has registered yet — e.g. on an unsupported platform, or before the Flutter plugin registrant has run. Each platform package sets this from its registerWith(), which Flutter invokes before main().

Implementation

static NutrientFlutterPlatform? get instance => _instance;
set instance (NutrientFlutterPlatform? instance)

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

Implementation

static set instance(NutrientFlutterPlatform? instance) {
  if (instance != null) {
    PlatformInterface.verifyToken(instance, _token);
  }
  _instance = instance;
}