setNewRoutePath method

  1. @override
Future<void> setNewRoutePath(
  1. AppRoutePath configuration
)
override

Of course, You're free to override this function if you like

Implementation

@override
Future<void> setNewRoutePath(AppRoutePath configuration) async {
  //
  if (configuration.isHomePage) {
    _currentConfiguration = configuration;
  } else
  // If not a recognized path
  if (!_addPage(configuration.path)) {
    //
    _addUnknown(configuration.path);

    _currentConfiguration = AppRoutePath.unknown(configuration.path);
    // This is a hack! There must be a better way.
  } else if (_backButtonPushed(configuration.path!)) {
    //
    _currentConfiguration = _previousPath();
  } else {
    _currentConfiguration = AppRoutePath.page(configuration.path);
  }
}