phoneFormat property

String phoneFormat

Phone number format.

E.g:(3-4-4) 188 0121 0281

Implementation

String get phoneFormat {
  final String phone = replaceAll(' ', '');
  assert(phone.length == 11, 'The length of the phone number is illegal.');
  final String phoneS = phone.substring(0, 3);
  final String phoneM = phone.substring(3, 7);
  final String phoneE = phone.substring(7);
  return '$phoneS $phoneM $phoneE';
}