MarkerController class
A unified controller for managing marker state and interactions.
Uses MarkerLogic strategy for implementation details.
- Inheritance
-
- Object
- ChangeNotifier
- InteractiveController<
Marker> - MarkerController
Constructors
Properties
- activeItem → Marker?
-
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<
Marker> -
no setterinherited
-
events
→ Stream<
InteractiveEvent< Marker> > -
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<
Marker> -
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<
Marker> -
no setterinherited
-
internalInitial
→ List<
Marker> -
no setterinherited
-
internalSaved
→ List<
Marker> -
no setterinherited
- isEditing → bool
-
no setterinherited
-
logic
↔ EntityLogic<
Marker> -
Must be implemented to provide type-specific logic.
latefinalinherited
- longPressedItem → Marker?
-
no setterinherited
-
longPressedKeys
→ Set<
Key> -
finalinherited
-
longPressedKeysView
→ Set<
Key> -
no setterinherited
-
onActiveCallback
→ ValueChanged<
Marker> ? -
no setterinherited
-
onAddedCallback
→ ValueChanged<
Marker> ? -
Callbacks for CRUD operations (optional).
no setterinherited
-
onHoverCallback
→ ValueChanged<
Marker> ? -
no setterinherited
-
onLongPressCallback
→ ValueChanged<
Marker> ? -
no setterinherited
-
onRemovedCallback
→ ValueChanged<
Marker> ? -
no setterinherited
-
onTapCallback
→ ValueChanged<
Marker> ? -
Callbacks for interactions (optional).
no setterinherited
-
onUpdatedCallback
→ ValueChanged<
Marker> ? -
no setterinherited
-
options
→ InteractiveOptions<
Marker> -
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
spatialIndex
→ SpatialIndex<
Marker> -
Spatial index for fast range queries.
finalinherited
-
transientKeys
→ Set<
Key> -
finalinherited
-
transientState
→ ValueListenable<
TransientState< Marker> ?> -
Exposes transient state as a listenable.
no setterinherited
-
transientStateNotifier
→ ValueNotifier<
TransientState< Marker> ?> -
Transient state for drag operations.
finalinherited
- version → int
-
no setterinherited
Methods
-
abort(
) → void -
Abort all changes and reverts to the initial state.
inherited
-
add(
Marker 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< Marker> oldState, required List<Marker> newState, required Object keySelector(Marker), required bool hasSpatialChange(Marker, Marker)}) → EntityDelta<Marker> -
Gets the delta between old and new states.
inherited
-
clearHover(
[Marker? item]) → void -
inherited
-
clearLongPress(
[Marker? item]) → void -
inherited
-
deselect(
[Marker? 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) → Marker? -
Finds an item by key.
inherited
-
hover(
Marker item) → void -
inherited
-
isActive(
Marker item) → bool -
inherited
-
isActiveKey(
Key? key) → bool -
inherited
-
isHovered(
Marker item) → bool -
inherited
-
isHoveredKey(
Key? key) → bool -
inherited
-
isLongPressed(
Marker item) → bool -
inherited
-
isLongPressedKey(
Key? key) → bool -
inherited
-
isTransient(
Marker 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(
Marker item) → void -
inherited
-
move(
Key key, 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< Marker> op, {bool merge = false, bool notify = true}) → void -
inherited
-
performOp(
Op< Marker> op, {bool merge = false}) → void -
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(
Marker item) → void -
inherited
-
setCallbacks(
{ValueChanged< Marker> ? onAdded, ValueChanged<Marker> ? onRemoved, ValueChanged<Marker> ? onUpdated, ValueChanged<EntityDelta< ? onSaved, ValueChanged<Marker> >Marker> ? onTap, ValueChanged<Marker> ? onActive, ValueChanged<Marker> ? onHover, ValueChanged<Marker> ? onLongPress}) → void -
inherited
-
setEditMode(
bool enable) → void -
inherited
-
setEditModeCallback(
ValueChanged< bool> ? callback) → void -
inherited
-
setItems(
List< Marker> items, {required bool resetHistory}) → void -
Sets the entire collection.
inherited
-
setMarkers(
List< Marker> markers, {bool resetHistory = false, bool merge = false}) → void -
setOptions(
InteractiveOptions< Marker> options) → void -
Updates the controller configuration options.
override
-
startDrag(
Marker item, LatLng origin) → void -
Starts a drag operation.
inherited
-
startEditMode(
) → void -
inherited
-
tap(
Marker item) → void -
inherited
-
toggleEditMode(
) → void -
inherited
-
toggleSelect(
Marker item) → void -
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
undo(
) → void -
Undo the last operation.
inherited
-
update(
Key key, Marker newItem, {bool merge = false}) → void -
Updates an item.
inherited
-
updateDrag(
LatLng current) → void -
Updates the current drag position.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
maybeOf(
BuildContext context) → MarkerController? -
of(
BuildContext context) → MarkerController