NeshanPolyline constructor
const
NeshanPolyline({})
Creates a new polyline.
id is a unique identifier for the polyline.
coordinates is the list of coordinates that define the line path.
color is the color of the line (default: blue).
width is the width of the line in pixels (default: 3).
opacity is the opacity of the line (0.0 to 1.0, default: 1.0).
isDashed determines whether the line is dashed or solid (default: false).
Implementation
const NeshanPolyline({
required this.id,
required this.coordinates,
this.color,
this.width = 3.0,
this.opacity = 1.0,
this.isDashed = false,
}) : assert(opacity >= 0.0 && opacity <= 1.0,
'opacity must be between 0.0 and 1.0'),
assert(width >= 0.0, 'width must be >= 0.0');