LanguageHelper class

Helper class around OpenFoodFactsLanguage

Constructors

LanguageHelper()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

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

fromJson(String? code) OpenFoodFactsLanguage
Converts an ISO-639-1 code into an OpenFoodFactsLanguage
fromJsonStringMap(dynamic map) Map<OpenFoodFactsLanguage, String>?
From a Map<String, String> in dynamic's clothing (JsonKey annotation)
fromJsonStringMapIsoList(dynamic map) List<OpenFoodFactsLanguage>?
Special case for ISO codes that should be unique for all languages.
fromJsonStringMapIsoUnique(dynamic map) String?
Special case for ISO codes that should be unique for all languages.
fromJsonStringMapList(dynamic map) Map<OpenFoodFactsLanguage, List<String>>?
From a Map<String, String> in dynamic's clothing (JsonKey annotation)
fromJsonStringsListMap(dynamic map) Map<OpenFoodFactsLanguage, List<String>>?
From a Map<String, List<String>> in dynamic's clothing (JsonKey)
toJson(OpenFoodFactsLanguage? language) String
Converts an OpenFoodFactsLanguage into an ISO-639-1 code
toJsonMap<T>(Map<OpenFoodFactsLanguage, T>? map) Map<String, T>?
Converts a Map with OpenFoodFactsLanguage into a map with ISO-639-1 codes.
toJsonStringMap(Map<OpenFoodFactsLanguage, String>? map) Map<String, String>?
Helper function without generic types. Needed for the @JsonKey annotation (the annotation can't work with generics).
toJsonStringsListMap(Map<OpenFoodFactsLanguage, List<String>>? map) Map<String, List<String>>?
Helper function without generic types. Needed for the @JsonKey annotation (the annotation can't work with generics).