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, String notificationChannelName = 'Background Location', AndroidResource notificationIcon = const AndroidResource(name: 'ic_launcher', defType: 'mipmap'), bool enableWifiLock = false, bool enableWakeLock = false, bool setOngoing = false, Color? color})
Creates an Android specific configuration for the FlutterBackground plugin.
const

Properties

color Color?
Accent color (an ARGB integer like the constants in Color) to be applied by the standard Style templates when presenting this notification.
final
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
notificationChannelName String
The user visible name of the notification channel.
final
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
setOngoing bool
When enabled, the displayed notification is persistent and the user cannot dismiss it
final

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