updateConfiguration method

void updateConfiguration(
  1. String? routeName,
  2. String? parameter,
  3. ValueChanged<RoutePath> requestRoute,
  4. bool reInit,
)

Implementation

void updateConfiguration(String? routeName, String? parameter,
    ValueChanged<RoutePath> requestRoute, bool reInit) {
  this.routeName = routeName;
  this.parameter = parameter;
  this.queryParameters = Uri.parse(parameter ?? '').queryParameters;
  this.reInit = reInit;
  _requestRoute = requestRoute;

  if (routeName == null || routeName.isEmpty) {
    routeInformation = FlickerConfiguration.dashboardRoute;
  } else {
    var routes = FlickerConfiguration.routes
        .where((element) => element.routeName == routeName);
    if (routes.isEmpty) {
      routeInformation = null;
    } else {
      routeInformation = routes.first;
    }
  }
}