Route<T> constructor

Route<T>({
  1. RouteSettings? settings,
  2. bool? requestFocus,
})

Initialize the Route.

If the settings are not provided, an empty RouteSettings object is used instead.

If requestFocus is not provided, the value of Navigator.requestFocus is used instead.

Implementation

Route({RouteSettings? settings, bool? requestFocus})
  : _settings = settings ?? const RouteSettings(),
    _requestFocus = requestFocus {
  assert(debugMaybeDispatchCreated('widgets', 'Route<T>', this));
}