SvgPath class

Represents an SVG path element (<path>).

Inheritance

Constructors

SvgPath({required String id, required String d})
Creates an SvgPath with the specified id and path data d.

Properties

d String
The path data string (the 'd' attribute).
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addAttribute(String key, String value) → void
Overridden to prevent manual modification of the 'd' attribute.
override
addAttributes(Map<String, String> attributes) → void
Overridden to prevent manual modification of the 'd' attribute via a map.
override
addChild(SvgElement child) → void
Paths cannot have children in this implementation.
override
addChildren(Iterable<SvgElement> children) → void
Paths cannot have children in this implementation.
override
addStyle(String key, String value) → void
Adds a single CSS-style attribute to the element.
inherited
addStyles(Map<String, String> styles) → void
Adds multiple CSS-style attributes to the element.
inherited
build() → XmlElement
Builds and returns the XmlElement for this element.
inherited
fill(Color color, {double? opacity}) → void
Sets the fill color and opacity for the path.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
stroke(Color color, {double? width, double? opacity}) → void
Sets the stroke color, width, and opacity for the path.
toString() String
Returns the XML string representation of this element.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited