useFCMWeb property
bool
get
useFCMWeb
Whether to enable FCM on web platforms. Default is false - web FCM requires VAPID key and service worker setup. Set to true only if you've configured web push notifications.
Can be set via:
- Code:
AppConfigBase.useFCMWebDefault = true - Build flag:
--dart-define USE_FCM_WEB=true
Implementation
static bool get useFCMWeb {
_useFCMWeb ??= const String.fromEnvironment('USE_FCM_WEB', defaultValue: '').isNotEmpty
? const String.fromEnvironment('USE_FCM_WEB', defaultValue: 'false') == 'true'
: (_useFCMWebDefault ?? false);
return _useFCMWeb!;
}