instance property Null safety

SharedPreferencesStorePlatform instance

The default instance of SharedPreferencesStorePlatform to use.

Defaults to MethodChannelSharedPreferencesStore.


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.


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