ItineraryRulesData class

State and callbacks for customizing itinerary search rules in ItineraryWidget.

Constructors

ItineraryRulesData({required List<String> availableRuleNames, required List<String> selectedRuleNames, required bool isPrmEnabled, required bool isPanelExpanded, required List<String> pendingRuleNames, required bool isRuleSelected(String ruleName), required bool isPendingRuleSelected(String ruleName), required void setRuleEnabled(String ruleName, bool enabled), required void applyRuleNames(List<String> ruleNames), required VoidCallback clearRules, required VoidCallback togglePanelExpanded, required void setPanelExpanded(bool isVisbile), required void togglePendingRule(String error), required VoidCallback applyPendingRules, required Widget buildDefaultInline(), required Widget buildDefaultPanel(), required Widget buildDefault()})
const

Properties

applyPendingRules VoidCallback
Apply pendingRuleNames, recalculate, and close the panel.
final
applyRuleNames → void Function(List<String> ruleNames)
Replace non-wheelchair rules and recalculate. wheelchair is preserved when isPrmEnabled is true.
final
availableRuleNames List<String>
Rule names from the map (MapManager.searchRuleNames), excluding wheelchair (controlled by the PMR switch).
final
buildDefault Widget Function()
Default inline button + panel when isPanelExpanded.
final
buildDefaultInline Widget Function()
Default SDK rules filter button (opens the panel on tap).
final
buildDefaultPanel Widget Function()
Default SDK expandable rules panel.
final
clearRules VoidCallback
Clear all rules except wheelchair when PMR is on, then recalculate.
final
hashCode int
The hash code for this object.
no setterinherited
isPanelExpanded bool
Whether the expandable rules panel is open.
final
isPendingRuleSelected bool Function(String ruleName)
final
isPrmEnabled bool
Whether the PMR switch is on.
final
isRuleSelected bool Function(String ruleName)
final
pendingRuleNames List<String>
Rule names selected in the panel before Apply (excludes wheelchair).
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selectedRuleNames List<String>
Currently applied rule names (includes wheelchair when PMR is on).
final
setPanelExpanded ValueChanged<bool>
Set panel visibility explicitly.
final
setRuleEnabled → void Function(String ruleName, bool enabled)
Toggle one rule and recalculate the itinerary immediately.
final
togglePanelExpanded VoidCallback
Open or close the rules panel (syncs pendingRuleNames from the current selection when opening).
final
togglePendingRule → void Function(String error)
Toggle a rule in the panel buffer (applied on applyPendingRules).
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