of static method

Implementation

static BottomNavPageState of(BuildContext context) {
  final BottomNavPageState? result =
      context.findAncestorStateOfType<BottomNavPageState>();
  if (result != null) {
    return result;
  }
  throw FlutterError("can not get BottomNavPageState");
}