modalRoute property

ModalRoute? get modalRoute

Returns the ModalRoute associated with this BuildContext.

If there is no ModalRoute associated with this BuildContext, it returns null.

Implementation

ModalRoute? get modalRoute => ModalRoute.of(this);