DataPath class
Represents a path into the nested submission data tree.
Can contain both String keys (for maps/objects) and int indices (for arrays/lists).
For example: DataPath(['users', 0, 'email']) corresponds to users[0].email.
- Annotations
Constructors
- DataPath([List segments = const []])
-
const
- DataPath.parse(String path)
-
Creates a DataPath from a dot-and-bracket notation string such as
items[0].priceoruser.name.factory
Properties
- hashCode → int
-
The hash code for this object.
no setteroverride
- isRoot → bool
-
no setter
- last → dynamic
-
no setter
- length → int
-
no setter
- parent → DataPath
-
Returns the parent path, or
rootif this path is already root.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- segments → List
-
final
Methods
-
child(
dynamic segment) → DataPath -
Returns a new DataPath with
segmentappended. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
resolve(
dynamic rootData) → dynamic -
Resolves the value at this path from a root map or list
rootData. -
toDotString(
) → String -
Formats this path as standard dot-and-bracket notation: e.g.
items[0].name. -
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override