LanguageQuality class

A class representing a language with an optional quality value.

Constructors

LanguageQuality(String language, [double? quality])
Constructs an instance of LanguageQuality.
const
LanguageQuality.parse(String value)
Parses a string value and returns a LanguageQuality instance.
factory

Properties

hashCode → int
The hash code for this object.
no setteroverride
language → String
The language value.
final
quality → double?
The quality value (default is 1.0).
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

encode() → String
Encodes this LanguageQuality into a string representation suitable for HTTP headers. The q-value is rendered with at most 3 fractional digits per RFC 9110 12.4.2.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
override