log method

void log(
  1. Route route,
  2. Route? previousRoute,
  3. String action
)

Logs navigation events.

Implementation

void log(Route<dynamic> route, Route<dynamic>? previousRoute, String action) {
  final logger = Logger('Modular');

  if (previousRoute != null) {
    logger.finest('$action from ${previousRoute.settings.name} to ${route.settings.name}');
  } else {
    logger.finest('$action to ${route.settings.name}');
  }
}