maybeFind<T> static method

T? maybeFind<T>(
  1. BuildContext context
)

Implementation

static T? maybeFind<T>(BuildContext context) {
  final widget = context.findAncestorWidgetOfExactType<Data<T>>();
  if (widget == null) {
    return null;
  }
  return widget.data;
}