canPop property
bool
get
canPop
Whether this route can be popped.
A route can be popped if there is at least one active route below it, or if willHandlePopInternally returns true.
When this changes, if the route is visible, the route will rebuild, and any widgets that used TransModalRoute.of will be notified.
Implementation
bool get canPop => hasActiveRouteBelow || willHandlePopInternally;