Top 10 packages to use with Flutter

Top 10 packages to use with Flutter

Hi everyone, in this article I want to share with you 10 of the best packages which I consider indispensable and which every Flutter developer should know. You could find all Flutter packages to use in your app here: pub.dev.

The list in an alphabetical order an not by importance because every package solves different problems and one cannot rank by importance.

Top 10

  • cached_network_image: this package manages images from internet like cache, loading widget during download, error widget in case of failure with a simple api. All you have to do is to pass the image's url and the library takes care of the rest;

  • dio: this package supercharge you http requests and gives you lots of options like Global configuration, FormData, Request Cancellation, File downloading, Timeout; the documentation it's pretty awesome and if you want to go to the next level with http requests you must try this package;

  • flutter_launcher_icons: this package lets you create and update quickly and without forgetting one all the Flutter app's launcher icon. It works on Android and iOS, you can use two separate icons or the same for both platforms, you can support adaptive Android icons; all you have to do is to create a base icon (and if you want a foreground and background icons for the adaptive one), launch a command from the terminal... and voilà;

  • flutter_native_splash: this package is very similar to flutter_launcher_icons because lets you to create the splash screen for an app. It works on Android and iOS and you can use a custom image as splashscreen or if you want you can set a background color and a foreground image/icon, launch a command from the terminal... and voilà;

  • google_fonts: this package lets you to use very easily all Google fonts. So if you want to use a Google font you don't have to download the .ttf files, create an assets folder, move the file inside a custom directory and put the reference in the pubspec.yaml; you only have to import the package and use the font that you want;

  • hive: this package lets you to use a lightweight and blazing fast key-value database written in pure Dart, if you want a lightweight datastore I think that hive it's a perfect fit;

  • image_cropper: this package lets you to manipulate images on both Android and iOS with a super simple API because the package hides all the platform stuff. For Android it uses uCrop library and TOCropViewController for iOS, but you don't have to know this two libraries;

  • share: this package lets you to easily share a text/link/title+text with other apps with native share dialog, on iOS it's an UIActivityViewController and on Android it's an ACTION_SEND Intent;

  • shared_preferences: this package lets you to store simple, not critical, data wrapping NSUserDefaults on iOS and SharedPreferences on Android. If you want to save simple data like access tokens, login information or not critical data this package is for you;

  • url_launcher: this package lets you to share an URL with some supported schemes: http, mailto, tel and sms. So if you have support mail it's easy to open the default mail client on the phone with all texts in place, make a call to the support number or send an SMS.

Conclusion

There are lots of package out there, some are cross platform and some platform specific, and you can browse all of them on the pub.dev website, read the documentation, go to the GitHub repo, study how a developer implement a custom functionality and improve your knowledge.

Code Strong, Alberto

Did you find this article valuable?

Support Alberto Bonacina by becoming a sponsor. Any amount is appreciated!