root static method

TrackerState? root(
  1. BuildContext context
)

获取TrackerState,便于你获取里面的数据

Implementation

static TrackerState? root(BuildContext context) {
  final TrackerInheritedWidget? widget = context.findAncestorWidgetOfExactType<TrackerInheritedWidget>();
  return widget?.inViewState;
}