toMap method
Converts this AndroidSettings to a map for native platform communication.
Returns: A map containing all Android-specific settings with keys defined in Keys.
Implementation
Map<String, dynamic> toMap() {
return {
Keys.SETTINGS_ACCURACY: accuracy.value,
Keys.SETTINGS_INTERVAL: interval,
Keys.SETTINGS_DISTANCE_FILTER: distanceFilter,
Keys.SETTINGS_ANDROID_WAKE_LOCK_TIME: wakeLockTime,
Keys.SETTINGS_ANDROID_NOTIFICATION_CHANNEL_NAME:
androidNotificationSettings.notificationChannelName,
Keys.SETTINGS_ANDROID_NOTIFICATION_TITLE:
androidNotificationSettings.notificationTitle,
Keys.SETTINGS_ANDROID_NOTIFICATION_MSG:
androidNotificationSettings.notificationMsg,
Keys.SETTINGS_ANDROID_NOTIFICATION_BIG_MSG:
androidNotificationSettings.notificationBigMsg,
Keys.SETTINGS_ANDROID_NOTIFICATION_ICON:
androidNotificationSettings.notificationIcon,
Keys.SETTINGS_ANDROID_NOTIFICATION_ICON_COLOR:
androidNotificationSettings.notificationIconColor.toARGB32(),
Keys.SETTINGS_ANDROID_LOCATION_CLIENT: client.index
};
}