findMessenger<T> method

T findMessenger<T>()

Find the stored data somewhere in the ancestor DataMessenger descendants. Throws an assertion error if the data is not found.

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

Implementation

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