ForegroundNotificationConfig constructor
const
ForegroundNotificationConfig({})
Creates an Android specific configuration for the FlutterBackground
plugin.
notificationTitle is the title used for the foreground service notification. notificationText is the body used for the foreground service notification. notificationIcon must be a drawable resource. E. g. if the icon with name "background_icon" is in the "drawable" resource folder, it should be of value `AndroidResource(name: 'background_icon', defType: 'drawable'). enableWifiLock indicates wether or not a WifiLock is acquired, when the background execution is started. This allows the application to keep the Wi-Fi radio awake, even when the user has not used the device in a while.
Implementation
const ForegroundNotificationConfig({
required this.notificationTitle,
required this.notificationText,
this.notificationIcon =
const AndroidResource(name: 'ic_launcher', defType: 'mipmap'),
this.enableWifiLock = false,
this.enableWakeLock = false,
});