of static method

FaradayNavigatorState of(
  1. BuildContext context
)
override

Implementation

static FaradayNavigatorState of(BuildContext context) {
  if (context is StatefulElement && context.state is FaradayNavigatorState) {
    return context.state as FaradayNavigatorState;
  }
  final faraday = context.findAncestorStateOfType<FaradayNavigatorState>();
  assert(faraday != null);
  return faraday!;
}