AndroidNotificationSettings class

Configuration for Android notification settings.

AndroidNotificationSettings allows you to customize the notification that appears in the notification drawer while the app is tracking location in the background. This notification is required on Android to keep the location service running.

Example:

final notificationSettings = AndroidNotificationSettings(
  notificationTitle: 'Tracking Your Location',
  notificationMsg: 'Location tracking is active',
  notificationIcon: 'ic_launcher',
);

Constructors

AndroidNotificationSettings({String notificationChannelName = 'Location tracking', String notificationTitle = 'Start Location Tracking', String notificationMsg = 'Track location in background', String notificationBigMsg = 'Background location is on to keep the app up-tp-date with your location. This is required for main features to work properly when the app is not running.', String notificationIcon = '', Color notificationIconColor = Colors.grey, VoidCallback? notificationTapCallback})
Creates an AndroidNotificationSettings instance.
const

Properties

hashCode int
The hash code for this object.
no setterinherited
notificationBigMsg String
The expanded message shown when the notification is expanded. Default: 'Background location is on to keep the app up-to-date with your location...'
final
notificationChannelName String
The name of the notification channel. Used for grouping notifications on Android 8.0+.
final
notificationIcon String
The icon name for the notification. Should be located in the 'mipmap' directory. Must have a transparent background and black/white shape to comply with Android rules. Default: app icon
final
notificationIconColor Color
The color of the notification icon in the notification drawer. Default: Colors.grey
final
notificationMsg String
The message displayed in the notification. Default: 'Track location in background'
final
notificationTapCallback VoidCallback?
Optional callback triggered when the notification is tapped.
final
notificationTitle String
The title displayed in the notification. Default: 'Start Location Tracking'
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
toString() String
A string representation of this object.
inherited

Operators

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