getChild<T extends ChildHandleType> method

T getChild<T extends ChildHandleType>(
  1. Object id
)

Gets the child handle with the specified id.

Implementation

T getChild<T extends ChildHandleType>(Object id) {
  final child = render.childHandleMap[id];
  assert(() {
    if (child == null) {
      throw FlutterError(
          'The $this boxy delegate attempted to get a nonexistent child.\n'
          'There is no child with the id "$id".');
    }
    return true;
  }());
  return child! as T;
}