flutter-libphonenumber
flutter-libphonenumber copied to clipboard
isValidPhoneNumber returns false in case of MissingPluginException
trafficstars
MissingPluginException: if the method has not been implemented by a platform plugin.
The try-catch block around the invokeMethod hides the MissingPluginException error to developers by returning false, maybe it would be better to catch only the PlatformException to notify developers instead of just returning false.
Example:
try {
return await method();
} on PlatformException catch (_) {
return false;
}
I see there is no implementation for the web. Originally the library it's based on is a javascript library and dart compiles to js. Is there platform specific code ?