Flutter: Quick Guide for Third Party Dependencies

Flutter: Quick Guide for Third Party Dependencies

Building a Flutter app? A list of third-party useful dependencies.

Image by rawpixel.com on Freepik

With my experience in building flutter applications, for the average starter developer, it is a matter of the question of which dependencies are more famous / commonly / stable for use to achieve functionality in their app.

Recommended readers: Developers should have basic flutter development knowledge

Please google the name of the dependency and you’ll get the pub.dev link to each 😄

Let's get started with the libraries that are part of an “Ideal App” used in live environments. 😇

Must Have

List of libraries that must be part of an app

State management: GetX / Bloc / Redux.
Coming from the backend development experience. I find GetX to be more convenient and have less overall code.

Device information: device_info_plus, package_info_plus
When you need information on the device like device id, OS, OS version, etc.

Biometric authentication: local_auth
Implement mobile fingerprint/face-scan features for authentication with ease.

Jailbreak detection: flutter_jailbreak_detection
Basic and best available on pub.dev. However, one would have to subscribe to a paid solution to implement the best in class since this area is evolving.

HTTP: dio & retrofit, http_certificate_pinning, pretty_dio_logger
Need to connect to server / implement SSL pinning/intercept requests and responses at common layer. Retrofit is a Dio client that makes consuming Rest APIs easier for us

Logging: logging
Instead of using print() 🙈, use the Logger library to log/print and control levels like INFO, DEBUG, etc, Instead of commenting on the print statements on go-live 😒.

Analytics: firebase_analytics
Get useful analytics of downloads, usage, etc from your app that can be viewed from Firebase admin dashboards

Secure Storage: flutter_secure_storage
Store your app secrets in a secure location of your phone's OS.

File storage access: path_provider
Access file storage, downloads, and app directory with ease.

Render SVG: flutter_svg
Render SVG as a widget.

Connectivity channel: connectivity_plus
Check if the device is connected to wifi or cellular.

Encryption/decryption: encrypt / pointy castle
In case you need AES / RSA algorithms in your code, use encrypted. The more elaborate library is pointycatle, a similar implementation of the bouncy castle in JAVA, .Net, etc.

Good to Have

List of libraries that might play a secondary role after “the must-have”

Configuration / KeyValue Management: firebase_remote_config
Manage your key/values of the app from the server with Firebase remote config. This might include the visibility of a module, app colour, etc.

Location information: geolocator, latlong2
Use this when your app needs to fetch geolocation from the phone's navigation.

App Version comparison: version
If you need to compare the app version with the server and show a dialog asking to update then this plugin is the way forward.

Pull to Refresh: pull_to_refresh
Allows you to receive a trigger when you pull from the top of your screen, now you can decide to refresh the page or do something else.

In-app browser: webview_flutter / flutter_inappwebview
Flutter default webview_flutter is good enough but when you need more easy out-of-the-box controls flutter_inappwebview. Remember flutter_inappwebview is negligibly slower than webview_flutter.

Local data storage: hive, hive_flutter, hive_generator
Store data for querying later / just simple JSON storage, I would recommend hive as the storage dependency for you.

Push Notification: firebase_messaging, firebase_core
Send iOS and Android notifications with just one library

Permission: permission_handler
Handle scenarios when your app user accepts or denies permission like camera access, etc.

Utility functions: basic_utils
Need common functions for strings, etc. Saves time writing or finding these functions.

Nice to Have

Optional libraries that may be implemented based on the use case.

Video player: better_player
Although Flutter comes with video_player if you need more custom prebuilt controls, better_player is the way to go.

Notification UI configuration: awesome_notifications
Control how notifications and their UI can be handled outside the app and within the app.

Maps: google_maps_flutter
Google Maps for your app

Open external URL: url_launcher
Open web, phone, SMS, and email apps

Preload animation sections: shimmer
Display Facebook, and Instagram-like preloader sections with this plugin

Swipe pages: preload_page_view / page_view / expandable_page_view
Use this when you want to show sections which can be horizontal/vertically swiped

Intro Screen: introduction_screen
Need to create a featured intro screen for your app? This is the plugin to go.

Cool Dialogs: awesome_dialog
Cool and customizable ready dialogue boxes

Localization: easy_localization / intl
My preferred libraries when I am working on apps that need multiple languages.

Photo Album: image_picker
If you need a basic photo picker then this library will be of use.

OTP Fields: flutter_otp_text_field
In case you need cool OTP / PIN type boxes.

Email validation: email_validator
Don’t get lost in doing the complex email validation logic. Use this.

Social share: social_share
Easy way to share content on social media with the share options

Charts: charts_flutter
Display charts on your app

Open external apps: external_app_launcher
Open external apps with this plugin

Show PDF documents: flutter_pdfview
I like this because it supports password-protected PDF files.

Technology is evolving and preferred libraries are subjected to change in future. 😄 . But stands true as of the date of this article.

This is not an exhaustive list but an attempt to highlight some preferred libraries in the industry one could use as a quick guide to starting real-world Flutter development.

Would like to know your views on any other dependencies that should have been part of this list?

Thanks for reading.