of static method

FToasterState of(
  1. BuildContext context
)

The state from the closest instance of this class that encloses the given context.

Implementation

static FToasterState of(BuildContext context) => context.findAncestorStateOfType<FToasterState>()!;