FreeStyleDrawable constructor
FreeStyleDrawable({})
Creates a FreeStyleDrawable to draw path
.
The path will be drawn with the passed color
and strokeWidth
if provided.
Implementation
FreeStyleDrawable({
required List<Offset> path,
double strokeWidth = 1,
this.color = Colors.black,
bool hidden = false,
}) :
// An empty path cannot be drawn, so it is an invalid argument.
assert(path.isNotEmpty, 'The path cannot be an empty list'),
// The line cannot have a non-positive stroke width.
assert(strokeWidth > 0,
'The stroke width cannot be less than or equal to 0'),
super(path: path, strokeWidth: strokeWidth, hidden: hidden);