A list of selected packages that can be useful for your projects in Dart and Flutter.

Every framework contains a lot of libraries that help developers to create valuable products. The same goes for the Flutter framework, known for having a solid community and numerous packages that make development faster and easier. Pub.dev is the official package repository for Dart and Flutter apps and currently contains over 24,000 packages. Some are essential for Android and iOS application development, especially in projects we create here at Applover. In this article, you will learn about some packages that I think are worth knowing and using.

How to pick the best Flutter packages?

Deciding on the right Flutter or Dart package to incorporate into your project can be a challenging decision. With the vast ecosystem of packages available, you’ll need to carefully weigh several factors to select the best fit for your requirements. Here are some guidelines to help you make an informed decision:

  1. Evaluate your needs: Identify what functionality or features you need from the package. Can it be built in-house, or is using a third-party package more time and cost-effective? Understanding the problem you want to solve is the first step.
  2. Check the popularity and community support: Look at the number of likes, stars, or votes a package has received in the public repositories. Active community support is often an indicator of the package’s reliability and quality.
  3. Assess the maintenance and documentation: How frequently is the package updated? Regular updates and a well-documented API are positive signs of an active and maintained package. Adequate documentation will make integrating the package into your project a smoother experience.
  4. Consider the license: Ensure the package’s license is compatible with your project’s needs. Some licenses might have restrictions or obligations that might not align with your project’s goals.
  5. Analyze the dependencies: Look at the other packages your chosen package depends on. Complicated dependencies might make maintenance more difficult in the future.
  6. Test the package: If possible, implement a simple test case using the package in a development environment. This will give you hands-on experience with the package, helping you evaluate its ease of use and compatibility with your project.
  7. Evaluate performance: Consider the performance implications of the package, especially if your application needs to be highly responsive. A poorly optimized package might lead to performance bottlenecks.

Top 13 packages for your Flutter project in 2023

mason

I would instead call it mason_the_game_changer! This is a powerful package that enables developers to create and consume reusable templates that are called bricks. With mason, you can write a piece of code as a brick and then reuse this across other projects. This makes it possible to automate repetitive processes. You can create your own bricks or use ready-made ones created by other developers. Ready-to-use bricks can be found on the brickhub.dev. To learn more about the mason, I recommend reading an article devoted entirely to this package.

flutter_bloc

This state management package handles the possible states of your application effortlessly. Absolute must-have package for Applover’s Flutter developers that is also an easily testable solution. Bloc is powerful because it helps create all kinds of applications, even the most complex ones.

flutter_hooks

This plugin is a Flutter implementation of React hooks. Hooks are a simple way to manage the Widget life-cycle that increases the code-sharing between widgets by removing duplicates. This package is a good substitute for the built-in Flutter Stateful Widget.

freezed

Freezed is a scalable code generator for data-classes/unions/pattern-matching/cloning. With freezed you do not have to override toString, operator ==, hashCode, or implement a copyWith method to clone the object. Implementing all of this could take a lot of valuable time but freezed will do it for us.

This is how your code would look like without freezed:

class Dog {
   const Dog({
     required this.name,
     required this.breed,
     required this.age,
   });
   final String name;
   final String breed;
   final int age;

   factory Dog fromJson(Map<String, dynamic> json) => Dog(
         name; json['name'] as String,
         breed: json['breed'] as String,
         age: json['age'] as int,
       );

    Map<String, dynamic> toJson() => {
        'name': name,
        'breed': breed,
        'age': age,
     };
    

    Dog copyWith({
      String? name,
      String? breed,
      int? age,
    )} =>
        Dog(
          name: name ?? this.name,
          breed: breed ?? this.breed,
          age: age ?? this.age,
        );

    @override
    String toString() => 'Dog('
        'name: $name,
        'breed: $breed,
        'age: $age)';

    @override 
    bool operator ==(Object other) =>
        other is Dog &&
        other.runtimeType == runtimeType &&
        other.name == name &&
        other.breed == breed &&
        other.age == age;

    @override 
    int get hashCode => Object.hash(
          runtimeType,
          name,
          breed,
          age,
         );
}

And this how it could look like if you use this package:

@freezed
class Dog with _$Dog {
  const factory Dog({
    required String name,
    required String breed, 
    required int age,
  }) = _Dog;

  factory Dog.fromJson(Map<String, dynamic> json) => _$DogFromJson(json);
}

purchases_flutter

When creating a Flutter application, you usually want to monetize it. There are many ways to do it. If you choose the free app with an in-app purchase model, this package is for you! The package is a client for the RevenueCat subscription and purchase tracking system. The framework provides ease of implementation and has some additional functionalities like charts, customer lists, and others that are available in the RevenueCat dashboard. This is a paid solution, but there is a possibility to use this package for free if your application’s revenue is less than $10,000 monthly (both iOS and Android). 

flutter_launcher_icons

Manually adding a launcher icon for your application is quite time-consuming. Especially in Flutter when you have to handle two or more platforms. But do not worry; there is a solution to that. The Flutter_launcher_icons package makes adding icons for all platforms take less than 5 minutes. All you have to do is simply configure the icon for the selected platforms and then enter just one command. It could not be simpler! 

flutter_native_splash

Something similar to the previous one, but now it is about the splash screen. The same – easy to configure and easy to run. One command, and it is ready!

package_info_plus

A valid Flutter package that provides an API for querying information about an application package. Using this plugin, there is no need to write native code to get information like package name or version number.

in_app_review

After the application is released, it is time to get new customers. Some users are more likely to download applications when they see that it has a lot of good ratings. With this package, you can show an adaptive review pop-up where users can leave a review for your application. Everything without closing your application and opening the store application.

flutter_screenutil

Different sizes of screens are challenging not only for designers but also for developers. Sometimes challenging situations can happen when something will not fit on a particular screen because it was hard to predict during development time. In this case, a Flutter package for adapting screen and font size is your solution. With this plugin, you can adjust the fonts and sizes based on the design. What does it mean? The application will look great regardless of what screen it is turned on. Everything will adjust automatically to the screen size.

animations

One of the things that capture the attention and engage users, as well as make applications look enjoyable to use, are animations. Of course, Flutter itself includes tools to manage animations. However, with this package, you can achieve beautiful transition effects with less effort. The animations can be fully customized. This package will take your application to another level.

equatable

A helpful package used to compare Dart objects. By default, ==  always returns true if two objects are in the same instance. Equatable package overrides == and hashCode for you, so you do not waste time writing lots of code. Additionally, there is no code generation needed.

url_launcher

Another simple yet functional package is url_launcher. It lets you launch external URLs from your application and supports various URL schemes. If your Flutter app requires launching web browsers, map applications, dialer applications, mail applications, and so on. Then, this package is for you. 

Contact

Do you want to find out more about Flutter development in 2023?

Talk to us!

Flutter & Dart packages for efficient app development

As I mentioned before, there are over 24,000 packages, so this list is not exhaustive. This article contains only a selection of the best Flutter packages that, in my opinion, are most useful for app development. I encourage you to check the Flutter & Dart packages you did not know yet or discover new ones on pub.dev.