of static method

The nearest toaster's state.

Implementation

static DesignToasterState of(BuildContext context) {
  final state = maybeOf(context);
  assert(state != null, 'No DesignToaster above this context.');
  return state!;
}