getRobotoffUri static method

Uri getRobotoffUri({
  1. required String path,
  2. Map<String, dynamic>? queryParameters,
  3. QueryType? queryType,
})

Returns a OFF-Robotoff uri with the in the OpenFoodAPIConfiguration specified settings

Implementation

static Uri getRobotoffUri({
  required final String path,
  final Map<String, dynamic>? queryParameters,
  final QueryType? queryType,
}) =>
    Uri(
      scheme: OpenFoodAPIConfiguration.uriScheme,
      host: OpenFoodAPIConfiguration.getQueryType(queryType) == QueryType.PROD
          ? OpenFoodAPIConfiguration.uriProdHostRobotoff
          : OpenFoodAPIConfiguration.uriTestHostRobotoff,
      path: path,
      queryParameters: queryParameters,
    );