FlutterBackgroundAndroidConfig class
Android configuration for the FlutterBackground plugin.
Constructors
- FlutterBackgroundAndroidConfig({String notificationTitle = 'Notification title', String notificationText = 'Notification text', AndroidNotificationImportance notificationImportance = AndroidNotificationImportance.normal, AndroidResource notificationIcon = const AndroidResource(name: 'ic_launcher', defType: 'mipmap'), bool enableWifiLock = true, bool showBadge = true, bool shouldRequestBatteryOptimizationsOff = true})
-
Creates an Android specific configuration for the FlutterBackground plugin.
const
Properties
- 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
- notificationImportance → AndroidNotificationImportance
-
The importance of the notification used for the foreground service.
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
- shouldRequestBatteryOptimizationsOff → bool
-
When enabled, request permission to disable battery optimizations.
This is enabled by default, and should only be disabled on platforms that
do not support it (ex: Wear OS).
final
- showBadge → bool
-
Show or hide notification badge on the app icon when the foreground
notification is shown (you have to reinstall the app for the change to
take effect).
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited