instance property Null safety

SharedPreferencesStorePlatform instance

The default instance of SharedPreferencesStorePlatform to use.

Defaults to MethodChannelSharedPreferencesStore.

Implementation

static SharedPreferencesStorePlatform get instance => _instance;
void instance=(SharedPreferencesStorePlatform value)

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

Implementation

static set instance(SharedPreferencesStorePlatform value) {
  if (!value.isMock) {
    try {
      value._verifyProvidesDefaultImplementations();
    } on NoSuchMethodError catch (_) {
      throw AssertionError(
          'Platform interfaces must not be implemented with `implements`');
    }
  }
  _instance = value;
}