pushIfExists method

dynamic pushIfExists(
  1. BuildContext context,
  2. String route
)

Implementation

pushIfExists(BuildContext context, String route) {
  if (route.isEmpty) {
    return;
  }
  if (routeExists(context, route)) {
    GoRouter.of(context).push(route);
  }
}