getParentViewModel<T> function

T getParentViewModel<T>(
  1. BuildContext context, {
  2. bool listen = true,
})

EXPERIMENTAL: Returns the ViewModel provided above this widget in the tree

Implementation

T getParentViewModel<T>(BuildContext context, {bool listen = true}) =>
    Provider.of<T>(context, listen: listen);