isCurrent method

bool isCurrent(
  1. String routeName
)

Implementation

bool isCurrent(String routeName) {
  ModalRoute? route = ModalRoute.of(this);
  return route?.settings.name == routeName;
}