RouteDetector constructor

const RouteDetector({
  1. Key? key,
  2. required RouteObserver<PageRoute> routeObserver,
  3. required Widget child,
  4. String? routeName,
  5. dynamic onLeaveScreen()?,
  6. dynamic onShowingScreen()?,
  7. bool showLogs = false,
})

Implementation

const RouteDetector({
  Key? key,
  //* A [Navigator] observer that notifies [RouteAware]s of changes to the state of their [Route].
  required this.routeObserver,

  //*Your Class that will be in route detection mode
  required this.child,

  //* Your route name or class name, it just an identifier to your class
  this.routeName,

  //* A Function that called when you navigate out the observed screen
  this.onLeaveScreen,

  //* A Function that called when you init or back to the observed screen
  this.onShowingScreen,

  //* A Logger for logging the screen status in your debug console
  this.showLogs = false,
}) : super(key: key);