PathDrawable constructor
Creates a PathDrawable to draw path
.
The path will be drawn with the passed strokeWidth
if provided.
Implementation
PathDrawable({
required this.path,
this.strokeWidth = 1,
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(hidden: hidden);