scaffoldState property

ScaffoldState? get scaffoldState

Returns the ScaffoldState of the context, if available. This property retrieves the state of a Scaffold widget, enabling access to methods like opening/closing drawers, showing snackbars, or navigating.

Implementation

ScaffoldState? get scaffoldState => Scaffold.maybeOf(this);