KBeanie

9 useful libraries for your Flutter project

Starting a new project in Flutter? Although the choice of libraries depends on your use case, here are the top 9 libraries that I think you should definitely be comfortable with. The list contains common libraries that you will probably use in almost all mobile apps if you are developing in flutter.

So, let’s get started.

1. cached_network_image (by Baseflow)

In almost every app that I have worked with, you will need a library for loading, displaying and caching images from the network.

“cached_network_image” is a library that is used to load remote images and display them, and it also caches them, as its name suggest. This is very easy to setup and use. It works flawlessly for both iOS and Android, but doesn’t yet work perfectly for web (caching not supported yet).

This library is quite flexible by default with lots of configuration options.

2. firebase_crashlytics (by Firebase team)

For mobile apps, it is very important to have a service that takes care of reporting crashes. For native apps, Firebase Crashlytics is the first choice for a majority of use cases.

“firebase_crashlytics” seems to be the go to solution for reporting crashes for flutter as well. However, setting it up was a bit challenging. The experience of integrating it with a flutter app was a bit painful if you compare it with the native SDK integration. But, once it is set up correctly, it worked fine for both Android and iOS apps.

3. shared_preferences (by Flutter team)

In any app, you are definitely going to use SharedPreferences and UserDefaults.

“shared_preferences” library is a great library to start with. Although I haven’t compared it with any other alternatives, this does the job flawlessly. Easy to setup and simple APIs.

4. share (by Flutter team)

Most apps do need to share some information with other apps. Often, apps would require to share textual data. But, at times, they might also want to share other data like files, photos, etc.

“share” is good library to start with. Easy to integrate and simple interface for sharing.

5. url_launcher (by Flutter team)

Want to launch web urls, dialer app, sms app, email app?

“url_launcher” is a great library that supports the following urls

  1. Web urls: Launches the web browser for “https:” and “http:” schemes
  2. Email addresses: Launches the email app for “mailto:” scheme
  3. Phone numbers: Opens the dialer for “tel:” scheme and the SMS app for “sms:” scheme

Simple integration and easy to use.

6. webview_flutter (by Flutter team)

Want to render an in-app web browser to load HTML content, local or remote? I use this quite often to load privacy policies, FAQs etc to render static HTML. Sometimes, I would also need to run JavaScripts as well.

“webview_flutter” has til now catered to all my use cases. Local HTML files, remote websites with JavaScript and CSS. Again, simple integration as to use. Extra points for the detailed documentation and examples.

7. fluttertoast (by Karthik Ponnam)

Want some toasts? It was a bit strange that Flutter doesn’t yet have the TOAST APIs in-built.

“fluttertoast” is a good library when compared to a few others that I have tried. Easy to setup. Simple API to use if you want to go with the default look and feel. Although it seems that this library supports UI customisations, it seemed quite a bit of work.

8. photo_view (by Renan)

“photo_view” is a great library for implementing a zoomable interface for images. It supports all the usual gestures like pinch to zoom, rotate and drag. You can also throw at it any other widget like Container, Button or SVG, however I haven’t tried that yet. It has worked great for me in both iOS and Android without any issues.

It has lots of configurations that can support any kind of use case.

9. location (by Guillaume Bernos)

“location” has been really useful for getting location information (GPS) on both Android and iOS. It has all the features that you would probably need when you want to deal with a user’s location. Handling permissions, errors, location updates, realtime updates: this library helps you with everything.

That’s all for now. If you think you know a great flutter library that would help us developers, to let us know.

Leave a Reply

Your email address will not be published. Required fields are marked *