findRoot<T> method

T findRoot<T>()

Find the root data of the given type from the context. Throws an assertion error if the data is not found.

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

Implementation

T findRoot<T>() {
  return Data.findRoot<T>(this);
}