UriHelper class

Helper class for constructing urls with the in the OpenFoodAPIConfiguration specified settings

Implementers

Constructors

UriHelper({required String host, String scheme = 'https', bool isTestMode = false, bool defaultAddUserAgentParameters = false})
const

Properties

defaultAddUserAgentParameters bool
final
hashCode int
The hash code for this object.
no setterinherited
host String
final
isTestMode bool
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scheme String
final

Methods

getPostUri({required String path}) Uri
getUri({required String path, Map<String, dynamic>? queryParameters, bool? addUserAgentParameters, String? userInfo, String? forcedHost}) Uri
Returns a OFF uri with the OpenFoodAPIConfiguration specified settings
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

replaceSubdomain(Uri uri, {OpenFoodFactsLanguage? language, OpenFoodFactsCountry? country}) Uri
Replaces the subdomain of an URI with specific country and language.
replaceSubdomainWithCodes(Uri uri, {String? languageCode, String? countryCode}) Uri
Replaces the subdomain of an URI with specific country and language.