operator []= method
Set a config, attribute, or child on this node.
Implementation
@override
operator []=(String name, value) {
if (name.startsWith(r'$') || name.startsWith(r'@')) {
if (name.startsWith(r'$')) {
configs[name] = value;
} else {
attributes[name] = value;
}
} else {
if (value is Node) {
addChild(name, value);
} else {
throw ArgumentError('Invalid value type. Expected Node.');
}
}
}