SvgElement class
Base class for SVG elements such as paths and groups.
Constructors
- SvgElement({required String tag, required String id})
-
Creates an SvgElement with the given
_tagand_id.
Properties
- 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 - Adds a custom attribute to the element.
-
addAttributes(
Map< String, String> attributes) → void - Adds multiple attributes to the element.
-
addChild(
SvgElement child) → void - Adds a child SvgElement to this element.
-
addChildren(
Iterable< SvgElement> children) → void - Adds multiple child SvgElements to this element.
-
addStyle(
String key, String value) → void - Adds a single CSS-style attribute to the element.
-
addStyles(
Map< String, String> styles) → void - Adds multiple CSS-style attributes to the element.
-
build(
) → XmlElement -
Builds and returns the
XmlElementfor this element. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
Returns the XML string representation of this element.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited