Attribute extension type
Attribute extension type wraps Element to distinguish them.
- on
-
- Element
Constructors
- Attribute.from(Element element)
Properties
-
args
→ UnmodifiableListView<
KeyVal> -
Get immutable list of
KeyValno setterinherited - hashCode → int
-
The hash code for this object.
no setterinherited
- isAttribute → bool
-
no setterinherited
- isComment → bool
-
no setterinherited
- isGlobal → bool
-
no setterinherited
- isStandard → bool
-
no setterinherited
- name → String
-
Attribute elements have a name.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- text → String
-
finalinherited
- type → ElementType
-
finalinherited
Methods
-
add(
KeyVal kv) → void -
Add a new
KeyValinherited -
getKeyValue(
String key, [String? or]) → String? -
Return
KeyVal.valas String or null. Optionalorvalue when key is null or unable to parse. Case-insensitive.inherited -
getKeyValueAsBool(
String key, [bool? or]) → bool -
Return
KeyVal.valas bool. Optionalorvalue when key is null or unable to parse. Default behavior for null values is to return false. If a number is provided, 0 is false, and everything else is true. If a string is provided, it will be compared to "true". Case-insensitive.inherited -
getKeyValueAsDouble(
String key, [double? or]) → double -
Return
KeyVal.valas double. Optionalorvalue when key is null or unable to parse. Default behavior for null values is to return 0.0. Case-insensitive.inherited -
getKeyValueAsInt(
String key, [int? or]) → int -
Return
KeyVal.valas int. Optionalorvalue when key is null or unable to parse. Default behavior for null values is to return 0. Case-insensitive.inherited -
hasKey(
String key) → bool -
Returns true if the element has a
KeyValwith the samekey. Case-insensitive.inherited -
hasKeys(
List< String> keys) → bool -
Returns true if the element has ALL keys of the same key string.
Useful for ensuring custom standard elements have all required keyvalues.
Case-insensitive.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
upsert(
KeyVal kv) → void -
Finds and updates
KeyValby itsKeyVal.keyInserts if not found orKeyVal.isNamelessis true.inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited