instance property
AwesomeNotificationsPlatform
get
instance
The default instance of AwesomeNotificationsPlatform to use.
Defaults to MethodChannelAwesomeNotifications.
Implementation
static AwesomeNotificationsPlatform get instance {
if (_instance == null) {
switch (operatingSystem) {
case "android":
case "ios":
_instance = MethodChannelAwesomeNotifications();
break;
default:
_instance = AwesomeNotificationsEmpty();
break;
}
}
return _instance!;
}
set
instance
(AwesomeNotificationsPlatform instance)
Platform-specific implementations should set this with their own platform-specific class that extends AwesomeNotificationsPlatform when they register themselves.
Implementation
static set instance(AwesomeNotificationsPlatform instance) {
PlatformInterface.verifyToken(instance, _token);
_instance = instance;
}