instance property
NativeSharedPreferencesStorePlatform
get
instance
The default instance of NativeSharedPreferencesStorePlatform to use.
Defaults to MethodChannelNativeSharedPreferencesStore.
Implementation
static NativeSharedPreferencesStorePlatform get instance => _instance;
set
instance
(NativeSharedPreferencesStorePlatform value)
Platform-specific plugins should set this with their own platform-specific class that extends NativeSharedPreferencesStorePlatform when they register themselves.
Implementation
static set instance(NativeSharedPreferencesStorePlatform value) {
if (!value.isMock) {
try {
value._verifyProvidesDefaultImplementations();
} on NoSuchMethodError catch (_) {
throw AssertionError(
'Platform interfaces must not be implemented with `implements`');
}
}
_instance = value;
}