Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

isValidPhoneNumber returns false in case of MissingPluginException #24

Open
ClemaX opened this issue Oct 1, 2020 · 1 comment
Open

Comments

@ClemaX
Copy link

ClemaX commented Oct 1, 2020

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;
}
@cedvdb
Copy link

cedvdb commented Mar 8, 2021

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 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants