isMobile static method

bool isMobile(
  1. String mobile
)

validation mobile number (Only Indian pattern and 10 digits mobile number accepted)

Implementation

static bool isMobile(String mobile) {
  return RegExp(r'^([6-9]{1})([0-9]{9})$').hasMatch(mobile);
}