10 Flutter tips — part 2/10
1. part not read yet? Click here!
The 2nd part of the series of 10 Flutter tips is here with new tips & tricks! In this post we will look at interesting backend packages, but also UI tips!
Provider
This package should be known by every developer, as it is very important in app development. You can use it to provide a value anywhere in the widget tree.
Riverpod
Of course, the whole thing is a bit duplicated now, but I would like to show you the differences between Provider and Riverpod. Riverpod is an improved version of Provider. But what do I mean by “improved”? One big advantage of Riverpod is that it doesn’t depend on Flutter, which means you can use Provider without BuildContext. There are many more advantages, which you can have a look at https://riverpod.dev/.
But then why did I include Provider in the list at all, if you should be using Riverpod either way? Well, quite simple. To understand and use Riverpod, you should know the basics of Provider.
Dio
The package dio is there to handle HTTP requests. It supports interception, global configuration, FormData, request cancellation, file downloading, timeout and much more.
But why not just use the http package, the one everyone should know?
Well, as mentioned above, it has a lot of advantages that help you a lot in sending HTTP requests and it is also very easy to use.
Translator
If you want to publish your app, it would be very nice if you could offer it in multiple languages. This is easily done with the translator package, which allows you to translate any string using the Google Translator API. This is logically not a perfect translation, but a good start.
Location
If you want to know where the user is, perhaps for a GPS app, then you can use the location package.
There is also a very nice tutorial on YouTube by Flutter for this package.
Url Launcher
The package url_launcher is used to easily call URLs.
Animated Text Kit
This package should already be known by many, as it has 1900 likes on pub.dev, has become Flutter Favorite and was already part of an episode of package of the week.
As the name says, you can animate any text with it. There are already a lot of predefined animations. My personal favorites are Rotate, Fade, Typer, Typewriter, Colorizer and Scale, but there are also TextLiquidFill, Wavy and Flicker.
If none of these suit your needs, you can easily create your own animation.
Reordable List View
This is a widget which is not from a package on pub.dev. As the name suggests, it gives you a ListView and then you can rearrange those items. I use this very often and this widget has also become Flutter Widget of the Week, so there is a very good and quick tutorial about it on YouTube.
Fl chart
Many people should already know the package fl_chart, but it is so good that it has to be added to the list. As the package name says, you can create charts with it. In the official README file there are 5 types, which can be customized very much. The 5 types are LineChart, BarChart, PieChart, ScatterChart and RadarChart.
Flutter SVG
SVG images are very important for an app in my opinion, because nobody wants to see pixelated and blurry illustrations. Unfortunately, without a package it is very difficult to use SVG images in Flutter and you would have to write a lot of code unnecessarily. Fortunately there is a solution for this, the flutter_svg package. With this package you can easily use SVG images without writing much code.
Conclusion
That’s it again. As you should have noticed, today I mainly referred to more popular packages and widgets. The reason for this is that this series is more suitable for beginners to get to know Flutter better. However, in the next posts I will also cover other, not so well-known widgets and packages.
If you liked this post, I would be very happy about some claps and I would be very happy if you follow me on Twitter and Medium!