Polyline class
Draws a line through geographical locations on the map.
- Annotations
Constructors
-
Polyline({required PolylineId polylineId, bool consumeTapEvents = false, Color color = Colors.black, Cap polylineCap = Cap.buttCap, JointType jointType = JointType.round, List<
LatLng> points = const <LatLng>[], List<PatternItem> patterns = const <PatternItem>[], bool visible = true, int width = 10, int? zIndex, VoidCallback? onTap}) -
const
Properties
- color → Color
-
Line segment color in ARGB format, the same format used by Color. The default value is black (0xff000000).
final
- consumeTapEvents → bool
-
True if the Polyline consumes tap events.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- jointType → JointType
-
Indicates whether the segments of the polyline should be drawn as geodesics, as opposed to straight lines
on the Mercator projection.
final
- onTap → VoidCallback?
-
Callbacks to receive tap events for polyline placed on this map.
final
-
patterns
→ List<
PatternItem> -
The stroke pattern for the polyline.
final
-
points
→ List<
LatLng> -
The vertices of the polyline to be drawn.
final
- polylineCap → Cap
-
The cap at the end vertex of the polyline.
final
- polylineId → PolylineId
-
Uniquely identifies a Polyline.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- visible → bool
-
True if the marker is visible.
final
- width → int
-
Width of the polyline, used to define the width of the line segment to be drawn.
final
- zIndex → int?
-
The z-index of the polyline, used to determine relative drawing order of
map overlays.
final
Methods
-
copyWith(
{Color? colorParam, bool? consumeTapEventsParam, Cap? polylineCapParam, bool? geodesicParam, JointType? jointTypeParam, List< PatternItem> ? patternsParam, List<LatLng> ? pointsParam, bool? visibleParam, int? widthParam, int? zIndexParam, VoidCallback? onTapParam}) → Polyline - Creates a new Polyline object whose values are the same as this instance, unless overwritten by the specified parameters.
-
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.
override