maybeOf<T> static method

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

Optionally find and listen to data changes of the data with the given type from the context.

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

Implementation

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