Building Flutter apps relies heavily on open-source packages. Over 24,000 packages are available on pub.dev to help you extend your Flutter application's functionality and bring it to the next level!
In this blog post, we'll explore the top Flutter libraries and packages available on pub.dev regarding State Management, API Calls, Chart and Graph, Maps, Storage, and other miscellaneous ones that are worth mentioning as well.
State Management in Flutter
When scaling a Flutter project, you’ll definitely need to consider a state management solution. There are lots of libraries available in the community to facilitate this:
- provider
Provider is one of the easiest state management package as well as Flutter Favourite and Flutter recommended package. If you are starting with State Management, don't forget to check this out! - flutter_bloc
BLoC or Business Logic Component is another State Management package that is famous in the Flutter Community. It has Flutter widgets that make it easy to implement the BLoC (Business Logic Component) design pattern. Built to be used with the bloc state management package. - flutter_riverpod
A state-management library that:
- catches programming errors at compile time rather than at runtime
- removes nesting for listening/combining objects
- ensures that the code is testable - flutter_redux
Redux is another State Management tool which contains a set of utilities that allow you to easily consume a Redux Store to build Flutter Widgets. - rxdart
BLoC/RxDart is not a state management solution per se, but it helps facilitate the handling of streams in general, which help manage the state. It extends the capabilities of Dart Streams and StreamControllers. RxDart does not provide its Observable class as a replacement for Dart Streams. Instead, it offers several additional Stream classes, operators (extension methods on the Stream class), and Subjects.
API Calls in Flutter
- http
http is the base package that is used for implementing API Calls. All other packages that we have for API Calls are implemented on top of http package. - dio
Dio is a powerful HTTP client for Dart which supports some additional functionalities like Interceptors, Global Configuration, FormData, Request Cancellation, File Downloading, Timeout, etc. - chopper
Chopper is a HTTP client generator for Dart and Flutter using source_gen.
Flutter Chart and Graph
- fl_chart
fl_chart is a highly customizable Flutter chart library that supports Line Chart, Bar Chart, Pie Chart, Scatter Chart and Radar Chart.
Maps for Flutter
- google_maps_flutter
This package helps you to integrate Google Maps in your Flutter Application. - mapbox_gl
This package helps you to integrate Mapbox. It allows showing embedded interactive and customizable vector maps inside a Flutter widget. - syncfusion_flutter_maps
The Flutter Maps package is a data visualization library for creating beautiful, interactive and customizable maps from shape files or WMTS services to visualize the geographical area. Though, the syncfusion_flutter_maps is a commercial package. To use this package, you need to have either a Syncfusion commercial license or Free Syncfusion Community licence.
Flutter Storage packages and libraries
- shared_preferences
This package allows you to store a small amount of data (not critical data) into the persistent storage of the platform. - sqflite
SQFLite is a package that allows you to store data in the local system at any path that you want. It provides SQL based queries and functions to do the task. - sembast
sembast db stands for Simple Embedded Application Store database. It is a NoSQL persistent embedded file system document-based database for Dart VM and Flutter with encryption support. - isar
isar db is an extremely fast, easy to use, and fully async NoSQL database for Flutter. - flutter_secure_storage
This plugin allows you to store data in a secure storage.
Other Flutter packages
These packages don't belong in any of the before mentioned categories, but they have been of great use for my work as a Software Developer, and I highly recommend checking them out!
- device_preview
This package provides rich functionality to check your app on various devices and get to know how your app will look on different screen size. This package is really helpful to test apps on multiple screen sizes without actually using multiple devices! - google_fonts
google_fonts allows us to add all the Google Fonts that are available to use for free like Roboto, Poppins, etc. - cached_network_image
Cached Network Image allows us to cache the image obtained from a URL so that next time it can use the same instance of the image. - path_provider
path_provider is also one of the most widely used packages that allow you to get the most commonly used locations on the file system. - url_launcher
url_launcher is a package that allows you to launch different URLs through your Flutter app. You can also use this to move the user to SMS, WhatsApp, Phone, Mail, etc. services! - webview_flutter
This package allows you to open an in-app browser and load a webpage in the browser. - permission_handler
With this plugin, you can request permissions across platforms (iOS, Android) and check their status. Users can also grant permissions through the device's app settings.
I hope that this article was helpful to discover Flutter's top libraries and packages! Do you know of one that can be beneficial as well? Link it in the comments!