maybeOf<T> static method

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

Implementation

static T? maybeOf<T>(BuildContext context) {
  final widget =
      context.dependOnInheritedWidgetOfExactType<ComponentTheme<T>>();
  if (widget == null) {
    return null;
  }
  return widget.data;
}