checkGroups method

  1. @override
bool checkGroups(
  1. PhoneNumberUtil util,
  2. PhoneNumber number,
  3. StringBuffer normalizedCandidate,
  4. List<String> expectedNumberGroups,
)
override

Returns true if the groups of digits found in our candidate phone number match our expectations.

number the original number we found when parsing normalizedCandidate the candidate number, normalized to only contain ASCII digits, but with non-digits (spaces etc) retained expectedNumberGroups the groups of digits that we would expect to see if we formatted this number

Implementation

@override
bool checkGroups(
  PhoneNumberUtil util,
  PhoneNumber number,
  StringBuffer normalizedCandidate,
  List<String> expectedNumberGroups,
) {
  return PhoneNumberMatcherImpl.allNumberGroupsRemainGrouped(
    util,
    number,
    normalizedCandidate,
    expectedNumberGroups,
  );
}