Number class

Constructors

Number({List<String> capable = const [], String? country, String? currency, String? e164, String? id, int? monthly, String? org, String? type})
Returns a new Number instance.

Properties

capable ↔ List<String>
Capable is what the number can carry: any of "voice", "sms", "mms", "fax". A number missing "sms" cannot send one no matter what this platform does.
getter/setter pair
country ↔ String?
Country is the ISO 3166-1 alpha-2 code the number is issued under. Numbering is national, so this is what makes a search answerable at all.
getter/setter pair
currency ↔ String?
Currency is the ISO 4217 code Monthly is denominated in. Without it the number beside it means nothing, so the two are always read together.
getter/setter pair
e164 ↔ String?
E164 is the number in E.164: a leading + and digits only, no spaces or dashes. That is what a carrier accepts and what a search result must be bought by.
getter/setter pair
hashCode → int
The hash code for this object.
no setteroverride
id ↔ String?
ID is the carrier's handle for the number, and the id every route here addresses it by. It is not the number itself — see E164.
getter/setter pair
monthly ↔ int?
Monthly is the recurring rental in the MINOR unit of Currency (cents for USD), exactly as the carrier quoted it. It is a price, not a charge: nothing is billed by this field.
getter/setter pair
org ↔ String?
Org is the tenant holding the number. A search result carries none — nobody holds it yet — which is how an available number is told from a held one.
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
type ↔ String?
Type is what kind of number it is: "local", "national", "tollfree" or "mobile". It decides both price and what a carrier will let it originate.
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
toString() → String
A string representation of this object.
override

Operators

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

Static Methods

fromJson(dynamic value) → Number?
Returns a new Number instance and imports its values from value if it's a Map, null otherwise.
listFromJson(dynamic json, {bool growable = false}) → List<Number>
mapFromJson(dynamic json) → Map<String, Number>
mapListFromJson(dynamic json, {bool growable = false}) → Map<String, List<Number>>

Constants

requiredKeys → const Set<String>
The list of required keys that must be present in a JSON.