scaffold property

ScaffoldState get scaffold

Returns the nearest ScaffoldState instance for the current context.

Example usage:

void example(BuildContext context) {
  final hasDrawer = context.scaffold.hasDrawer;
  assert(hasDrawer == true || hasDrawer == false);
}

void main() {}

Implementation

ScaffoldState get scaffold => Scaffold.of(this);