flutter-libphonenumber icon indicating copy to clipboard operation
flutter-libphonenumber copied to clipboard

isValidPhoneNumber always returns false when called from flutter test

Open shbkrm opened this issue 3 years ago • 3 comments

The following valid test case always fails ` import 'package:flutter_test/flutter_test.dart'; import 'package:libphonenumber/libphonenumber.dart';

void main() { test('Verify valid phone number', () async { //A valid phone number and country code var res = await PhoneNumberUtil.isValidPhoneNumber(phoneNumber: "xxxxxxxxxx", isoCode: "IN"); expect(res, true); }); } `

shbkrm avatar May 28 '21 10:05 shbkrm

I am facing same issue. Passing a valid india mobile number with isoCode "IN" returns false always.

jaigahlot avatar Jun 06 '21 14:06 jaigahlot

I am also facing same issue, anyone have found better alternative?

lalitjadav007 avatar Aug 20 '21 09:08 lalitjadav007

Cleaning the project and re-compiling it solved the problem for me.

ashraf-kx avatar Oct 18 '21 00:10 ashraf-kx