PolygonEditorController class
Controller for managing polygon and polyline editing state.
Extends ChangeNotifier to provide reactive updates when points or mode change.
- Inheritance
-
- Object
- ChangeNotifier
- PolygonEditorController
Constructors
- PolygonEditorController({PolygonEditorMode mode = PolygonEditorMode.polygon})
- Creates a new controller with the specified editing mode.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
Whether any listeners are currently registered.
no setterinherited
- mode → PolygonEditorMode
-
The current editing mode (polygon or line).
no setter
-
points
→ List<
LatLng> -
The current list of points forming the polygon or polyline.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
addListener(
VoidCallback listener) → void -
Register a closure to be called when the object changes.
inherited
-
addPoint(
LatLng point) → void - Adds a new point to the end of the points list.
-
clear(
) → void - Removes all points from the list.
-
dispose(
) → void -
Discards any resources used by the object.
inherited
-
insertPoint(
int index, LatLng point) → void - Inserts a point at the specified index.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyListeners(
) → void -
Call all the registered listeners.
inherited
-
removeLast(
) → LatLng? - Removes and returns the last point from the list.
-
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that are
notified when the object changes.
inherited
-
removePoint(
int index) → void - Removes the point at the specified index.
-
setMode(
PolygonEditorMode mode) → void - Changes the editing mode and notifies listeners.
-
setPoints(
List< LatLng> points) → void - Replaces all points with a new list of points.
-
toString(
) → String -
A string representation of this object.
inherited
-
updatePoint(
int index, LatLng point) → void - Updates the point at the specified index with a new position.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited