ItineraryWidgetController class

Controls itinerary panel state and user actions for WemapMap and custom UI.

Obtain an instance from ItineraryWidgetData.controller when using WemapMap.itineraryWidgetBuilder. Listen with ListenableBuilder (or addListener) and call the documented action methods below.

Internal lifecycle and map callbacks are not part of the public API.

Inheritance

Constructors

ItineraryWidgetController()

Properties

currentItinerary Itinerary?
Last successfully calculated itinerary, if any.
no setter
endPoint ItineraryPoint?
Destination point for the current itinerary.
no setter
endPointLabel String
Display label for the destination.
no setter
hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
isCalculating bool
Whether a new route is being calculated.
no setter
isChoosingStartOnMap bool
Whether the user is picking a new start point on the map.
no setter
isPrmEnabled bool
Whether PRM / wheelchair routing is enabled.
no setter
isRulesPanelExpanded bool
Whether the expandable rules panel is open.
no setter
isStartPointFocused bool
Whether the start-point text field currently has focus.
no setter
isVisible bool
Whether the itinerary panel should be shown.
no setter
itineraryArrivalTime DateTime
Estimated arrival time based on the last successful calculation.
no setter
itineraryFailed bool
Whether the last itinerary calculation failed.
no setter
itineraryHours int
Estimated duration — hours component.
no setter
itineraryMinutes int
Estimated duration — minutes component (within the current hour).
no setter
itinerarySeconds int
Estimated duration — seconds component (when under one minute).
no setter
locationSource LocationSource
Location source configured on the map (GPS or VPS).
no setter
nonWheelchairRuleNames List<String>
Search rule names from the map, excluding wheelchair (PRM switch).
no setter
pendingRuleNames List<String>
Rule names selected in the panel before Apply (excludes wheelchair).
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selectedRuleNames List<String>
Currently applied search rule names (includes wheelchair when PRM is on).
no setter
showStartNavigationButton bool
Whether the Start navigation button should be shown (origin is the user's live location).
no setter
startPoint ItineraryPoint?
Resolved start point label and coordinate, when available.
no setter
startPointLabel String
Display label for the start point.
no setter
startPointSearchResults List<PointOfInterestWithInfo>
POI search results while editing the start point.
no setter
startPointType ItineraryStartPointType?
How the itinerary origin was chosen (user location, map center, or POI).
no setter
vpsScanFlowDisabled bool
Whether VPS scan flow is disabled (maybe because another location source is set, or VPS is not available for the current device).
no setter
vpsState VPSState
Current VPS positioning state (for start-point flows with VPS maps).
no setter

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
applyPendingRules() → void
Applies pendingRuleNames, recalculates the route, and closes the panel.
applyRuleNames(List<String> ruleNames) → void
Replaces non-wheelchair rules and recalculates. wheelchair is preserved when isPrmEnabled is true.
clearRules() → void
Clears all rules except wheelchair when PRM is on, then recalculates.
close() → void
Closes the itinerary panel and removes the route from the map.
dispose() → void
Discards any resources used by the object.
override
focusStartPoint() → void
Focuses the start-point field and prepares start-point editing.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
onStartPointFocusChanged(bool hasFocus) → void
Notifies the controller when the start-point field focus changes.
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
selectStartOnMap() → void
Enters map pick mode so the user can set the start point by moving the map.
selectStartPoi(PointOfInterest poi) → void
Sets the start point from a POI search result and recalculates the route.
setPrmEnabled(bool value) → void
Enables or disables PRM / wheelchair routing and recalculates the route.
setRuleEnabled(String ruleName, bool enabled) → void
Toggles a single search rule and recalculates the route immediately.
setRulesPanelExpanded(bool expanded) → void
Sets rules panel visibility. Opening syncs pendingRuleNames from the current selection.
setStartFromUserLocation(BuildContext context) Future<void>
Sets the start point to the user's location (GPS permission or VPS scan).
startNavigation() → void
Starts turn-by-turn navigation for the current itinerary.
swapPoints() Future<void>
Swaps start and destination, then recalculates the route.
togglePendingRule(String ruleName) → void
Toggles a rule in the panel buffer (applied on applyPendingRules).
toggleRulesPanel() → void
Opens or closes the expandable rules panel.
toString() String
A string representation of this object.
inherited
unfocusStartPoint() → void
Unfocuses the start-point field and ends start-point editing.
updateStartPointQuery(String text) Future<void>
Updates the start-point search query and refreshes startPointSearchResults.

Operators

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