onBefore method

  1. @override
void onBefore(
  1. MiddlewareContext context
)
override

Implementation

@override
void onBefore(MiddlewareContext context) {
  if (context.previousState.location == context.targetState.location &&
      context.previousState.overlayStacks.length ==
          context.targetState.overlayStacks.length) {
    return;
  }
  onLog(
    '→ ${context.targetState.location} (from ${context.previousState.location})',
  );
}