phone function

String phone([
  1. String? temp
])

It generates a random phone number.

Args: temp (String): The template to use for the phone number.

Returns: A string of a phone number.

Implementation

String phone([String? temp]) {
  String phoneNumber;
  if (temp != null) {
    phoneNumber = template(temp);
  } else {
    phoneNumber = (Random().nextInt(99999999) + 1000000000).toString();
  }
  return phoneNumber;
}