CNode setAttribute(String key, dynamic value) { final newMap = _attributes; newMap[key] = value; return copyWith(attributes: newMap); }