get<N extends Node> static method

N get<N extends Node>(
  1. BuildContext context,
  2. N original
)

Resolves the given original node.

If the node is overridden in an ancestor SignalScope, returns the overridden instance. Otherwise, returns original.

Implementation

static N get<N extends Node>(BuildContext context, N original) {
  final scope = maybeOf(context);
  if (scope != null && scope.overrides.containsKey(original)) {
    return scope.overrides[original] as N;
  }
  return original;
}