getCurrentRoute static method

String getCurrentRoute({
  1. String defaultRoute = '',
})

Returns the currentRoute or defaultRoute.

Implementation

static String getCurrentRoute({String defaultRoute = ''}) {
  var route = currentRoute ?? '';
  return route.isNotEmpty ? route : defaultRoute;
}