maybeFind<T> static method

T? maybeFind<T>(
  1. BuildContext context,
  2. Symbol key
)

Optionally find the data of the given type from the context. Returns null if the data is not found.

  • T The type of the data.
  • context The build context.
  • key The data key.

Implementation

static T? maybeFind<T>(BuildContext context, Symbol key) {
  return maybeOfProperty<T>(context, key)?.value;
}