PolylineController class
A unified controller for managing polyline state (CRUD) and user interactions (Selection, Hover).
- Inheritance
-
- Object
- ChangeNotifier
- InteractiveController<
InteractivePolyline< Object> > - PolylineController
Constructors
Properties
-
activeItem
→ InteractivePolyline<
Object> ? -
no setterinherited
- activeKey → Key?
-
no setterinherited
-
activeKeys
→ Set<
Key> -
Interaction state sets.
finalinherited
-
activeKeysView
→ Set<
Key> -
no setterinherited
- canRedo → bool
-
Whether redo is available.
no setterinherited
- canUndo → bool
-
Whether undo is available.
no setterinherited
-
current
→ List<
InteractivePolyline< Object> > -
no setterinherited
-
events
→ Stream<
InteractiveEvent< InteractivePolyline< >Object> > -
Stream of all interactive events.
no setterinherited
- hasActive → bool
-
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasHovered → bool
-
no setterinherited
- hasListeners → bool
-
Whether any listeners are currently registered.
no setterinherited
- hasUnsavedChanges → bool
-
no setterinherited
-
history
→ HistoryManager<
InteractivePolyline< Object> > -
Must be implemented by the using class to provide access to the history manager.
no setterinherited
- hoveredKey → Key?
-
no setterinherited
-
hoveredKeys
→ Set<
Key> -
finalinherited
-
hoveredKeysView
→ Set<
Key> -
no setterinherited
-
internalCurrent
→ List<
InteractivePolyline< Object> > -
no setterinherited
-
internalInitial
→ List<
InteractivePolyline< Object> > -
no setterinherited
-
internalSaved
→ List<
InteractivePolyline< Object> > -
no setterinherited
- isEditing → bool
-
no setterinherited
-
logic
↔ EntityLogic<
InteractivePolyline< Object> > -
Must be implemented to provide type-specific logic.
latefinalinherited
-
longPressedItem
→ InteractivePolyline<
Object> ? -
no setterinherited
-
longPressedKeys
→ Set<
Key> -
finalinherited
-
longPressedKeysView
→ Set<
Key> -
no setterinherited
-
onActiveCallback
→ ValueChanged<
InteractivePolyline< ?Object> > -
no setterinherited
-
onAddedCallback
→ ValueChanged<
InteractivePolyline< ?Object> > -
Callbacks for CRUD operations (optional).
no setterinherited
-
onHoverCallback
→ ValueChanged<
InteractivePolyline< ?Object> > -
no setterinherited
-
onLongPressCallback
→ ValueChanged<
InteractivePolyline< ?Object> > -
no setterinherited
-
onRemovedCallback
→ ValueChanged<
InteractivePolyline< ?Object> > -
no setterinherited
-
onTapCallback
→ ValueChanged<
InteractivePolyline< ?Object> > -
Callbacks for interactions (optional).
no setterinherited
-
onUpdatedCallback
→ ValueChanged<
InteractivePolyline< ?Object> > -
no setterinherited
-
options
→ InteractiveOptions<
InteractivePolyline< Object> > -
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
spatialIndex
→ SpatialIndex<
InteractivePolyline< Object> > -
Spatial index for fast range queries.
finalinherited
-
transientKeys
→ Set<
Key> -
finalinherited
-
transientState
→ ValueListenable<
TransientState< InteractivePolyline< ?>Object> > -
Exposes transient state as a listenable.
no setterinherited
-
transientStateNotifier
→ ValueNotifier<
TransientState< InteractivePolyline< ?>Object> > -
Transient state for drag operations.
finalinherited
- version → int
-
no setterinherited
Methods
-
abort(
) → void -
Abort all changes and reverts to the initial state.
inherited
-
add(
InteractivePolyline< Object> item, {bool notify = true}) → void -
Adds an item to the collection.
inherited
-
addListener(
VoidCallback listener) → void -
Register a closure to be called when the object changes.
inherited
-
calculateDelta(
{required List< InteractivePolyline< oldState, required List<Object> >InteractivePolyline< newState, required Object keySelector(InteractivePolyline<Object> >Object> ), required bool hasSpatialChange(InteractivePolyline<Object> , InteractivePolyline<Object> )}) → EntityDelta<InteractivePolyline< Object> > -
Gets the delta between old and new states.
inherited
-
clearHover(
[InteractivePolyline< Object> ? item]) → void -
inherited
-
clearLongPress(
[InteractivePolyline< Object> ? item]) → void -
inherited
-
deselect(
[InteractivePolyline< Object> ? item]) → void -
inherited
-
discard(
) → void -
Discards all changes and reverts to the saved state.
inherited
-
dispose(
) → void -
Discards any resources used by the object.
inherited
-
disposeDrag(
) → void -
inherited
-
emitEvent(
dynamic itemOrEvent) → void -
Emits an event based on the provided item or context.
This is called by mixins to emit type-safe events.
inherited
-
endDrag(
) → void -
Ends the drag operation and commits the change.
inherited
-
ensureIndexFresh(
) → void -
Ensures spatial index is up-to-date before querying.
Call this before any spatial operations.
inherited
-
exitEditMode(
) → void -
inherited
-
findByKey(
Key key) → InteractivePolyline< Object> ? -
Finds an item by key.
inherited
-
hover(
InteractivePolyline< Object> item) → void -
inherited
-
isActive(
InteractivePolyline< Object> item) → bool -
inherited
-
isActiveKey(
Key? key) → bool -
inherited
-
isHovered(
InteractivePolyline< Object> item) → bool -
inherited
-
isHoveredKey(
Key? key) → bool -
inherited
-
isLongPressed(
InteractivePolyline< Object> item) → bool -
inherited
-
isLongPressedKey(
Key? key) → bool -
inherited
-
isTransient(
InteractivePolyline< Object> item) → bool -
Checks if an item is in transient state.
inherited
-
isTransientKey(
Key? key) → bool -
Checks if a key is in transient state.
inherited
-
longPress(
InteractivePolyline< Object> item) → void -
inherited
-
move(
Key key, LatLng to, {bool merge = false}) → void -
movePoint(
{required Key key, required int index, required LatLng from, required LatLng to, bool merge = false}) → void -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyListeners(
) → void -
Must be implemented to notify listeners.
inherited
-
perform(
Op< InteractivePolyline< op, {bool merge = false, bool notify = true}) → voidObject> > -
inherited
-
performOp(
Op< InteractivePolyline< op, {bool merge = false}) → voidObject> > -
Must be implemented to perform operations.
inherited
-
redo(
) → void -
Redo the previously undone operation.
inherited
-
refreshInteractionReferences(
Set< Key> currentKeys) → void -
inherited
-
remove(
Key key, {VoidCallback? onBeforeRemove}) → void -
Removes an item by key.
inherited
-
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that are
notified when the object changes.
inherited
-
save(
{bool erase = false}) → void -
Saves the current state.
inherited
-
scheduleAutoSave(
) → void -
inherited
-
select(
InteractivePolyline< Object> item) → void -
inherited
-
setCallbacks(
{ValueChanged< InteractivePolyline< ? onAdded, ValueChanged<Object> >InteractivePolyline< ? onRemoved, ValueChanged<Object> >InteractivePolyline< ? onUpdated, ValueChanged<Object> >EntityDelta< ? onSaved, ValueChanged<InteractivePolyline< >Object> >InteractivePolyline< ? onTap, ValueChanged<Object> >InteractivePolyline< ? onActive, ValueChanged<Object> >InteractivePolyline< ? onHover, ValueChanged<Object> >InteractivePolyline< ? onLongPress}) → voidObject> > -
inherited
-
setEditMode(
bool enable) → void -
inherited
-
setEditModeCallback(
ValueChanged< bool> ? callback) → void -
inherited
-
setItems(
List< InteractivePolyline< items, {required bool resetHistory}) → voidObject> > -
Sets the entire collection.
inherited
-
setOptions(
InteractiveOptions< InteractivePolyline< options) → voidObject> > -
Updates the controller configuration options.
override
-
setPolylines(
List< InteractivePolyline< polylines, {required bool resetHistory}) → voidObject> > -
startDrag(
InteractivePolyline< Object> item, LatLng origin) → void -
Starts a drag operation.
inherited
-
startEditMode(
) → void -
inherited
-
tap(
InteractivePolyline< Object> item) → void -
inherited
-
toggleEditMode(
) → void -
inherited
-
toggleSelect(
InteractivePolyline< Object> item) → void -
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
undo(
) → void -
Undo the last operation.
inherited
-
update(
Key key, InteractivePolyline< Object> newItem, {bool merge = false}) → void -
Updates an item.
inherited
-
updateDrag(
LatLng current) → void -
Updates the current drag position.
inherited
-
updatePoints(
Key key, List< LatLng> newPoints, {bool merge = false}) → void
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited