Flutter: Must have packages

  • Mathieu Baechler

Flutter SDK has a growing community providing help and features in an open-sourced ecosystem. There are many shared packages available in the wild.

Learn more about our Mobile Apps service.

Our experiences with Flutter

We had multiple experiences with Flutter. In our projects we always focus on delivering a high-quality product. Therefore, we decided to change some of the packages previously used in Kariyon's project and try some alternatives.

Which packages for the architecture?

We used to go with the MVVM Pattern as the main pattern in mobile applications with Kotlin and Swift. For Flutter, a new pattern emerged: the BLoC Pattern. This option has the same objective as the MVVM one, to separate the view from the logic. There are a lot of similarities between them. The main difference between the two is their affiliation. With MVVM, the ViewModel will be linked to a View. The BLoC will be more centred around a group of features. For the BLoC Pattern, we use the package flutter_bloc.

Which packages for injection dependency?

There are two main packages for injection dependency in Flutter, either get_it or provider. The first one uses the Service Locator Pattern. At first glance, this package could be the best one, as it's easy to understand and use. But I recommend you to use the package provider. It takes a little bit longer to master, but you won't regret it. provider follows the ideology of Flutter and will be good for the health of your mobile app in the long run. If you use the flutter_bloc package mentioned above, both have the same structure, and your application will be more homogeneous.

Which package for the user location?

We tried both location and geolocator packages. They seem to be quite good, and both are usable. We currently recommend using geolocator as its community is more active. We got to experience a bug report with the package, and it got resolved within a few days.

Other packages to keep an eye on

We could speak about dozens of packages with alternatives for essential features. But for now, we stick to this list:

  • permission_handler - Even if every package needing a permission lets you ask for it, it's a good practice to use only one package for that, as you can develop the feature only once for all.
  • flutter_svg - The SVG format is not supported by Flutter without a package. This one solves the problem.
  • flutter_lints - It's always good to have a linter for the project to be clean. A must-have!

And a lot of others: flutter_secure_storage, url_launcher, intl, firebase_core, cached_network_image, …

We are curious to hear about your experiences with Flutter, please leave us a comment.
Are you interested in collaborating on a project with us? Contact us to have a chat about Flutter and more.


Tell us what you think