BrMobileStrip class

BrMobile as a digit-only value.

Brazilian mobile numbers corresponding to the pattern '(##) ##### - ####' will have the hyphen "-", the left "(" and right ")" parenthesis removed from them. However, if a number is already fully numeric (containing or not the code prefix '+55'), it will remain as is. Finally, if the number is malformed, the value 'null' will be returned as an indication of a formatting error. For example:

  • if the number is '(21) 91234-5678', then the return value will be '92112345678'
  • if the number is '9876543210', then the return value will also be '9876543210'
  • if the number contains the Brazilian code prefix '+55' like '+559876543210', then the return value will also be '+559876543210'
  • if the number is malformed like '983191+060', then the return value will be the null value

Constructors

BrMobileStrip(String _brMobile)
It strips the hyfen '-' and parenthesis from the BrMobile value.
const

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value String?
BrMobile as a digit-only value — without the hyphen and parenthesis.
no setter

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