maybeFindRoot<T> method

T? maybeFindRoot<T>()

Optionally find the root data of the given type from the context.

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

Implementation

T? maybeFindRoot<T>() {
  assert(state.mounted, 'State is not mounted');
  return Data.maybeFindRoot<T>(state.context);
}