of static method

从 context 中获取 DrawerStackController Reads the nearest DrawerStackController from context.

Implementation

static DrawerStackController? of(BuildContext context) {
  return context
      .dependOnInheritedWidgetOfExactType<InheritedDrawerStackController>()
      ?.controller;
}