constructReference method
Creates a new BoundStateRefererence
that indexes even deeper than this
one (deeper into the specified widget's state, not into a deeper widget!).
For example, suppose a widget's arguments consisted of a map with one key,
"a", whose value was a BoundStateRefererence
referencing "state.foo.bar".
Now suppose that the widget itself has an ArgsReference that references
"args.a.baz". The "args.a" part identifies the aforementioned
BoundStateReference, and so the resulting reference is actually to
"state.foo.bar.baz".
In this example, the BoundStateReference to "state.foo.bar" would have
its constructReference method invoked by the runtime, with ["baz"]
as
the moreParts
argument, so that the resulting BoundStateReference's
parts is a combination of the original's (["foo", "bar"]
) and the
additional parts provided to the method.
The depth is maintained in the new object.
Implementation
BoundStateReference constructReference(List<Object> moreParts) {
return BoundStateReference(depth, parts + moreParts);
}