findAncestorBeagleView function

BeagleView findAncestorBeagleView(
  1. BuildContext context
)

Implementation

BeagleView findAncestorBeagleView(BuildContext context) {
  final widget = context.findAncestorWidgetOfExactType<BeagleWidget>();
  if (widget == null) {
    throw ErrorDescription('Could not find any BeagleWidget in the current context.');
  }
  return widget.view;
}