PhoneMetadata class

If you add, remove, or rename fields, or change their semantics, check if you should change the excludable field sets or the behavior in MetadataFilter.

Inheritance
Available extensions

Constructors

PhoneMetadata({PhoneNumberDesc? generalDesc, PhoneNumberDesc? fixedLine, PhoneNumberDesc? mobile, PhoneNumberDesc? tollFree, PhoneNumberDesc? premiumRate, PhoneNumberDesc? sharedCost, PhoneNumberDesc? personalNumber, PhoneNumberDesc? voip, String? id, int? countryCode, String? internationalPrefix, String? nationalPrefix, String? preferredExtnPrefix, String? nationalPrefixForParsing, String? nationalPrefixTransformRule, String? preferredInternationalPrefix, bool? sameMobileAndFixedLinePattern, Iterable<NumberFormat>? numberFormat, Iterable<NumberFormat>? intlNumberFormat, PhoneNumberDesc? pager, bool? mainCountryForCode, String? leadingDigits, PhoneNumberDesc? noInternationalDialling, PhoneNumberDesc? uan, PhoneNumberDesc? emergency, PhoneNumberDesc? voicemail, PhoneNumberDesc? shortCode, PhoneNumberDesc? standardRate, PhoneNumberDesc? carrierSpecific, bool? mobileNumberPortableRegion, PhoneNumberDesc? smsServices})
factory
PhoneMetadata.fromBuffer(List<int> i, [ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
factory
PhoneMetadata.fromJson(String i, [ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
factory

Properties

carrierSpecific PhoneNumberDesc
getter/setter pair
countryCode int
The country calling code that one would dial from overseas when trying to dial a phone number in this country. For example, this would be "64" for New Zealand.
getter/setter pair
emergency PhoneNumberDesc
getter/setter pair
eventPlugin EventPlugin?
Subclasses can override this getter to be notified of changes to protobuf fields.
no setterinherited
fixedLine PhoneNumberDesc
getter/setter pair
generalDesc PhoneNumberDesc
The general_desc contains information which is a superset of descriptions for all types of phone numbers. If any element is missing in the description of a specific type in the XML file, the element will inherit from its counterpart in the general_desc. For all types that are generally relevant to normal phone numbers, if the whole type is missing in the PhoneNumberMetadata XML file, it will not have national number data, and the possible lengths will be -1.
getter/setter pair
hashCode int
Calculates a hash code based on the contents of the protobuf.
no setterinherited
id String
The CLDR 2-letter representation of a country/region, with the exception of "country calling codes" used for non-geographical entities, such as Universal International Toll Free Number (+800). These are all given the ID "001", since this is the numeric region code for the world according to UN M.49: http://en.wikipedia.org/wiki/UN_M.49
getter/setter pair
info_ BuilderInfo
no setteroverride
internationalPrefix String
The international_prefix of country A is the number that needs to be dialled from country A to another country (country B). This is followed by the country code for country B. Note that some countries may have more than one international prefix, and for those cases, a regular expression matching the international prefixes will be stored in this field.
getter/setter pair
intlNumberFormat List<NumberFormat>
This field is populated only when the national significant number is formatted differently when it forms part of the INTERNATIONAL format and NATIONAL format. A case in point is mobile numbers in Argentina: The number, which would be written in INTERNATIONAL format as +54 9 343 555 1212, will be written as 0343 15 555 1212 for NATIONAL format. In this case, the prefix 9 is inserted when dialling from overseas, but otherwise the prefix 0 and the carrier selection code 15 (inserted after the area code of 343) is used. Note: this field is populated by setting a value for
no setter
isFrozen bool
Returns true if this message is marked read-only. Otherwise false.
no setterinherited
leadingDigits String
This field is populated only for countries or regions that share a country calling code. If a number matches this pattern, it could belong to this region. This is not intended as a replacement for IsValidForRegion since a matching prefix is insufficient for a number to be valid. Furthermore, it does not contain all the prefixes valid for a region - for example, 800 numbers are valid for all NANPA countries and are hence not listed here. This field should be a regular expression of the expected prefix match. It is used merely as a short-cut for working out which region a number comes from in the case that there is only one, so leading_digit prefixes should not overlap.
getter/setter pair
mainCountryForCode bool
This field is set when this country is considered to be the main country for a calling code. It may not be set by more than one country with the same calling code, and it should not be set by countries with a unique calling code. This can be used to indicate that "GB" is the main country for the calling code "44" for example, rather than Jersey or the Isle of Man.
getter/setter pair
mobile PhoneNumberDesc
getter/setter pair
mobileNumberPortableRegion bool
This field is set when this country has implemented mobile number portability. This means that transferring mobile numbers between carriers is allowed. A consequence of this is that phone prefix to carrier mapping is less reliable.
getter/setter pair
nationalPrefix String
The national prefix of country A is the number that needs to be dialled before the national significant number when dialling internally. This would not be dialled when dialling internationally. For example, in New Zealand, the number that would be locally dialled as 09 345 3456 would be dialled from overseas as +64 9 345 3456. In this case, 0 is the national prefix.
getter/setter pair
nationalPrefixForParsing String
This field is used for cases where the national prefix of a country contains a carrier selection code, and is written in the form of a regular expression. For example, to dial the number 2222-2222 in Fortaleza, Brazil (area code 85) using the long distance carrier Oi (selection code 31), one would dial 0 31 85 2222 2222. Assuming the only other possible carrier selection code is 32, the field will contain "0312".
getter/setter pair
nationalPrefixTransformRule String
This field is only populated and used under very rare situations. For example, mobile numbers in Argentina are written in two completely different ways when dialed in-country and out-of-country (e.g. 0343 15 555 1212 is exactly the same number as +54 9 343 555 1212). This field is used together with national_prefix_for_parsing to transform the number into a particular representation for storing in the phonenumber proto buffer in those rare cases.
getter/setter pair
noInternationalDialling PhoneNumberDesc
The rules here distinguish the numbers that are only able to be dialled nationally.
getter/setter pair
numberFormat List<NumberFormat>
Note that the number format here is used for formatting only, not parsing. Hence all the varied ways a user may write a number need not be recorded
no setter
pager PhoneNumberDesc
getter/setter pair
personalNumber PhoneNumberDesc
getter/setter pair
preferredExtnPrefix String
The preferred prefix when specifying an extension in this country. This is used for formatting only, and if this is not specified, a suitable default should be used instead. For example, if you wanted extensions to be formatted in the following way: 1 (365) 345 445 ext. 2345 " ext. " should be the preferred extension prefix.
getter/setter pair
preferredInternationalPrefix String
If the international prefix that we want to use when formatting the number for out-of-country dialling contains non-digit symbols, or there is more than one international prefix is present, a preferred prefix can be specified here for out-of-country formatting purposes. If this field is not present, and multiple international prefixes are present, then "+" will be used instead.
getter/setter pair
premiumRate PhoneNumberDesc
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sameMobileAndFixedLinePattern bool
Specifies whether the mobile and fixed-line patterns are the same or not. This is used to speed up determining phone number type in countries where these two types of phone numbers can never be distinguished.
getter/setter pair
sharedCost PhoneNumberDesc
getter/setter pair
shortCode PhoneNumberDesc
getter/setter pair
smsServices PhoneNumberDesc
getter/setter pair
standardRate PhoneNumberDesc
getter/setter pair
tollFree PhoneNumberDesc
getter/setter pair
uan PhoneNumberDesc
getter/setter pair
unknownFields UnknownFieldSet
no setterinherited
voicemail PhoneNumberDesc
getter/setter pair
voip PhoneNumberDesc
getter/setter pair

Methods

addExtension(Extension extension, Object? value) → void
Adds an extension field value to a repeated field.
inherited
check() → void
inherited
clear() → void
Clears all data that was set in this message.
inherited
clearCarrierSpecific() → void
clearCountryCode() → void
clearEmergency() → void
clearExtension(Extension extension) → void
Clears an extension field and also removes the extension.
inherited
clearField(int tagNumber) → void
Clears the contents of a given field.
inherited
clearFixedLine() → void
clearGeneralDesc() → void
clearId() → void
clearInternationalPrefix() → void
clearLeadingDigits() → void
clearMainCountryForCode() → void
clearMobile() → void
clearMobileNumberPortableRegion() → void
clearNationalPrefix() → void
clearNationalPrefixForParsing() → void
clearNationalPrefixTransformRule() → void
clearNoInternationalDialling() → void
clearPager() → void
clearPersonalNumber() → void
clearPreferredExtnPrefix() → void
clearPreferredInternationalPrefix() → void
clearPremiumRate() → void
clearSameMobileAndFixedLinePattern() → void
clearSharedCost() → void
clearShortCode() → void
clearSmsServices() → void
clearStandardRate() → void
clearTollFree() → void
clearUan() → void
clearVoicemail() → void
clearVoip() → void
clone() PhoneMetadata
Creates a deep copy of the fields in this message. (The generated code uses mergeFromMessage.)
override
copyWith(void updates(PhoneMetadata)) PhoneMetadata
Apply updates to a copy of this message.
override
createEmptyInstance() PhoneMetadata
Creates an empty instance of the same message type as this.
override
createMapField<K, V>(int tagNumber, MapFieldInfo<K, V> fi) Map<K, V>
Creates a Map representing a map field.
inherited
createRepeatedField<T>(int tagNumber, FieldInfo<T> fi) List<T>
Creates List implementing a mutable repeated field.
inherited
ensureCarrierSpecific() PhoneNumberDesc
ensureEmergency() PhoneNumberDesc
ensureFixedLine() PhoneNumberDesc
ensureGeneralDesc() PhoneNumberDesc
ensureMobile() PhoneNumberDesc
ensureNoInternationalDialling() PhoneNumberDesc
ensurePager() PhoneNumberDesc
ensurePersonalNumber() PhoneNumberDesc
ensurePremiumRate() PhoneNumberDesc
ensureSharedCost() PhoneNumberDesc
ensureShortCode() PhoneNumberDesc
ensureSmsServices() PhoneNumberDesc
ensureStandardRate() PhoneNumberDesc
ensureTollFree() PhoneNumberDesc
ensureUan() PhoneNumberDesc
ensureVoicemail() PhoneNumberDesc
ensureVoip() PhoneNumberDesc
extensionsAreInitialized() bool
inherited
freeze() GeneratedMessage
Make this message read-only.
inherited
getDefaultForField(int tagNumber) → dynamic
Returns the default value for the given field.
inherited
getExtension(Extension extension) → dynamic
Returns the value of extension.
inherited
getField(int tagNumber) → dynamic
Returns the value of the field associated with tagNumber, or the default value if it is not set.
inherited
getFieldOrNull(int tagNumber) → dynamic
Returns the value of a field, ignoring any defaults.
inherited
getTagNumber(String fieldName) int?
inherited
hasCarrierSpecific() bool
hasCountryCode() bool
hasEmergency() bool
hasExtension(Extension extension) bool
Returns true if a value of extension is present.
inherited
hasField(int tagNumber) bool
Whether this message has a field associated with tagNumber.
inherited
hasFixedLine() bool
hasGeneralDesc() bool
hasId() bool
hasInternationalPrefix() bool
hasLeadingDigits() bool
hasMainCountryForCode() bool
hasMobile() bool
hasMobileNumberPortableRegion() bool
hasNationalPrefix() bool
hasNationalPrefixForParsing() bool
hasNationalPrefixTransformRule() bool
hasNoInternationalDialling() bool
hasPager() bool
hasPersonalNumber() bool
hasPreferredExtnPrefix() bool
hasPreferredInternationalPrefix() bool
hasPremiumRate() bool
hasRequiredFields() bool
Whether the message has required fields.
inherited
hasSameMobileAndFixedLinePattern() bool
hasSharedCost() bool
hasShortCode() bool
hasSmsServices() bool
hasStandardRate() bool
hasTollFree() bool
hasUan() bool
hasVoicemail() bool
hasVoip() bool
isInitialized() bool
Whether all required fields in the message and embedded messages are set.
inherited
mergeFromBuffer(List<int> input, [ExtensionRegistry extensionRegistry = ExtensionRegistry.EMPTY]) → void
Merges serialized protocol buffer data into this message.
inherited
mergeFromCodedBufferReader(CodedBufferReader input, [ExtensionRegistry extensionRegistry = ExtensionRegistry.EMPTY]) → void
inherited
mergeFromJson(String data, [ExtensionRegistry extensionRegistry = ExtensionRegistry.EMPTY]) → void
Merges field values from data, a JSON object, encoded as described by GeneratedMessage.writeToJson.
inherited
mergeFromJsonMap(Map<String, dynamic> json, [ExtensionRegistry extensionRegistry = ExtensionRegistry.EMPTY]) → void
Merges field values from a JSON object represented as a Dart map.
inherited
mergeFromMessage(GeneratedMessage other) → void
Merges the contents of the other into this message.
inherited
mergeFromProto3Json(Object? json, {TypeRegistry typeRegistry = const TypeRegistry.empty(), bool ignoreUnknownFields = false, bool supportNamesWithUnderscores = true, bool permissiveEnums = false}) → void
Merges field values from json, a JSON object using proto3 encoding.
inherited
mergeUnknownFields(UnknownFieldSet unknownFieldSet) → void
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setExtension(Extension extension, Object value) → void
Sets the value of a non-repeated extension field to value.
inherited
setField(int tagNumber, Object value) → void
Sets the value of a field by its tagNumber.
inherited
toBuilder() GeneratedMessage
Creates a writable, shallow copy of this message.
inherited
toDebugString() String
Returns a String representation of this message.
inherited
toProto3Json({TypeRegistry typeRegistry = const TypeRegistry.empty()}) Object?
Returns an Object representing Proto3 JSON serialization of this.
inherited
toString() String
Returns a String representation of this message.
inherited
writeToBuffer() Uint8List
inherited
writeToCodedBufferWriter(CodedBufferWriter output) → void
inherited
writeToJson() String
Returns a JSON string that encodes this message.
inherited
writeToJsonMap() Map<String, dynamic>
Returns the JSON encoding of this message as a Dart Map.
inherited

Operators

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