findProperty<T> method

ModelProperty<T> findProperty<T>(
  1. Symbol key
)

Find the property 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.
  • key The data key.

Implementation

ModelProperty<T> findProperty<T>(Symbol key) {
  assert(state.mounted, 'State is not mounted');
  return Model.findProperty<T>(state.context, key);
}