findModel<T> method
Find the data of the given type from the context. Throws an assertion error if the data is not found.
TThe type of the data.- context The build context.
keyThe data key.
Implementation
T findModel<T>(Symbol key) {
return Model.of<T>(this, key);
}