sharmadhiraj / installed_apps

Flutter plugin with utility methods related to installed apps on device.
https://pub.dev/packages/installed_apps
Apache License 2.0
23 stars 35 forks source link

Improve getAppInfo Method: Return Null for Uninstalled Apps #28

Closed leywino closed 1 month ago

leywino commented 2 months ago

Problem: When using the getAppInfo method, the method throws an exception if the application is not installed, instead of returning a value that can be handled programmatically.

Solution: For my specific use case, I modified the getAppInfo method to return null when the application is not found, instead of throwing an exception. This allows for more graceful handling of scenarios where the application is not installed, without disrupting the flow of the application with an unhandled exception.