Phone class
A phone number
Field | Android | iOS |
---|---|---|
number | ✔ | ✔ |
normalizedNumber | ✔ | ⨯ |
label | ✔ | ✔ |
customLabel | ✔ | ✔ |
isPrimary | ✔ | ⨯ |
- Annotations
- @JsonSerializable(disallowUnrecognizedKeys: true)
Constructors
- Phone(String number, {PhoneLabel label: PhoneLabel.mobile, String normalizedNumber: "", String customLabel: "", bool isPrimary: false})
-
Phone.fromJson(Map<
String, dynamic> json) -
factory
Properties
- customLabel ↔ String
-
If customLabel is PhoneLabel.custom, free-form user-chosen label.
@JsonKey(defaultValue: ""), read / write
- hashCode → int
-
The hash code for this object. [...]
read-only, inherited
- isPrimary ↔ bool
-
Android has a notion of primary phone, so that "call X" means call X's
primary phone number, in case there are multiple. Android only.
@JsonKey(defaultValue: false), read / write
- label ↔ PhoneLabel
-
The label or type of phone it is. If
custom
, the free-form label can be found in customLabel.@JsonKey(defaultValue: PhoneLabel.mobile), read / write - normalizedNumber ↔ String
-
Normalized phone number (android only). [...]
@JsonKey(defaultValue: ""), read / write
- number ↔ String
-
Phone number.
@JsonKey(required: true), read / write
- runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed. [...]
inherited
-
toJson(
) → Map< String, dynamic> -
toString(
) → String -
Returns a string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator. [...]
inherited