initialTrigger property
GeofenceEventType
get
initialTrigger
The initial trigger for the geofence zone.
If, at the moment of adding the geofence, the initial trigger matches one of the triggers, the event will be triggered.
For example: if the initial trigger is set to GeofenceEventType.enter and the user is inside the geofence zone when the zone is added, the GeofenceEventType.enter event will be triggered.
The default value is GeofenceEventType.enter.
Supported on Android and iOS. On iOS only GeofenceEventType.enter and GeofenceEventType.exit are meaningful.
To also learn that the device is outside the zone when it is added, use initialTriggers with both GeofenceEventType.enter and GeofenceEventType.exit. When initialTriggers is set, it takes precedence and this getter returns its first element.
Implementation
GeofenceEventType get initialTrigger => initialTriggers.first;