maybeOf<T> static method

RadioGroupRegistry<T>? maybeOf<T>(
  1. BuildContext context
)

Gets the RadioGroupRegistry from the above the context.

This registers a dependencies on the context that it causes rebuild if RadioGroupRegistry has changed or its RadioGroupRegistry.groupValue has changed.

Implementation

static RadioGroupRegistry<T>? maybeOf<T>(BuildContext context) {
  return context.dependOnInheritedWidgetOfExactType<_RadioGroupStateScope<T>>()?.state;
}