getUri method
Returns a OFF uri with the OpenFoodAPIConfiguration specified settings
Typical use-case of "addUserAgentParameters
= false" is for other
request than GET, e.g. POST or MULTIPART, where we add the user agent
parameters in another part of the code.
Implementation
Uri getUri({
required final String path,
final Map<String, dynamic>? queryParameters,
final bool? addUserAgentParameters,
final String? userInfo,
final String? forcedHost,
}) =>
Uri(
scheme: scheme,
host: forcedHost ?? host,
path: path,
queryParameters: addUserAgentParameters ?? defaultAddUserAgentParameters
? HttpHelper.addUserAgentParameters(queryParameters)
: queryParameters,
userInfo: userInfo,
);