ForegroundNotificationConfig class

Configuration for the foreground notification. When this is provided the location service will run as a foreground service.

Constructors

ForegroundNotificationConfig({required String notificationTitle, required String notificationText, AndroidResource notificationIcon = const AndroidResource(name: 'ic_launcher', defType: 'mipmap'), bool enableWifiLock = false, bool enableWakeLock = false})
Creates an Android specific configuration for the FlutterBackground plugin.
const

Properties

enableWakeLock → bool
When enabled, a Wakelock is acquired when background execution is started.
final
enableWifiLock → bool
When enabled, a WifiLock is acquired when 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 (e.g. for background network communications).
final
hashCode → int
The hash code for this object.
no setterinherited
notificationIcon → AndroidResource
The resource name of the icon to be used for the foreground notification.
final
notificationText → String
The body used for the foreground service notification.
final
notificationTitle → String
The title used for the foreground service notification.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
Returns a JSON representation of this class.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited