Flutter packages I use in every project

In this article, I just want to introduce new users to my favorite packages.

We’re going to talk about some of the best Flutter packages that can reduce your development time and improve the performance of your Flutter app in no time.

These Flutter packages and libraries are used for various aspects of the Flutter technology. So let’s start with them.

State management

I think riverpod is the best solution for state management.

It’s fast, reliable, perfect. Below are the reasons why you should choose Riverpod:

  • It does not depend directly on the Flutter SDK.

  • Riverpod can be used to create and enforce unidirectional data flow with model classes that are immutable (meaning they don’t change).

  • Riverpod does not depend directly on the widget tree; its operation is similar to that of a service locator. Providers are declared globally and can be used anywhere in the application

  • catches programming errors at compile time, not at run time

  • removes nesting for listening/combining objects

  • ensures code testability

  • auto-delete support

  • comparison of previous and new state

  • implements an undo-redo mechanism

  • debug application state

Read my riverpod guide.

Clean code

flutter_hooks gives us much cleaner code and saves us boilerplate codes by handling them all for us.

You can check out my article on hooksfor some ideas.

Forms

I use it to create crisper and better quality flutter forms. This helps us get rid of a lot of boilerplate code.

I also have article about this package.

Modeling

Data classes in Dart suck. Because you have to manually handle functions like toJson-fromJson, they are mutable and whatnot.

Solutions such as JSON to Dart and quicktype, give us only limited configuration and customization.

But there are two packages that provide a complete solution for data classes. They are highly customizable, very reliable, save us a lot of boilerplate code.

This json_serializable and freezed

JSON Serializable + Freezed is the ideal option. There will be no problems with your models now.

HTTP client

dio much better than the package http.

Because it has interceptors and advanced features, plugins cache_interceptor, pretty_dio_logger, cookie_manager; it is also possible to create your own spoilers.

Animations

Lottie is a simplified animation package. You can create animation in Adobe After Effects and easily animate in Flutter. It’s fast and lightweight, so you don’t have to worry about potential memory and CPU issues. This will make your application much more user friendly.

Also you can find many animations here.

storage

shared_preferences ok, but it’s slow and very limited, too primitive and overpriced.

I use mainly package hivebut now i love it objectbox

  • Easy to use

  • Pretty fast

  • Secure (extended encryption support)

  • Works not only with primitives, also supports complex objects

  • Even faster hive and supports automatic data sync across devices

I18N and L10N (Internationalization and Localization)

If your application is multilingual, then intl is simply necessary because it is of great help in solving localization problems, such as:

  • Time Zones

  • Temporary formats

  • Number formats

  • Currency formats

  • Plurals and Gender Features…

Production helper

You don’t need to process all native codes and files.

Create native screensaver of just one command line.

Create launcher icons for each device with just one magic command. For detailed information, please see this article.

Navigation and Utilities

GetX has a pretty good navigation system and a lot of useful features.

  • Ease of use

  • Navigation without contex

  • Support for dynamic URLs

  • Middleware support

  • It also has so many additional features that I can’t list them all.

You can read more here.

I also use this solution for state management and dependency injection, but only for medium and small projects.

Best UI/UX experience

Why not bottom sheet by default?

  • It is much more user friendly

  • Ability to view with internal scrolling + drag down to close

  • Support for native stacked bottom sheet

  • Well customizable

The flash package is like a swiss army knife. It is highly customizable and extremely powerful.

I AM use it for dialog boxes, snackbars and toasts.

It is highly customizable and much more user friendly.

Automatic caching images and professional image processing.


Material prepared as part of the course Flutter Mobile Developer.

We invite everyone to a free two-day intensive “Flutter engine, animation and its optimization”. At the intensive, we will look at the deepest mechanisms of the Flutter Engine and learn how to create complex and smooth animations both on mobile platforms and on the web version, use profiling tools to prevent interface freezing. We will also touch on the topic of using WebGL in Flutter web applications to create 3D scenes. registration here.

Similar Posts

Leave a Reply

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