The most important packages in the Dart and Flutter ecosystem at Pub 2024

Very Good Ventures conducted study and published a ranking of the most important packages in the Dart and Flutter ecosystem.

We tell you which packages made it to the top – from independent developers, companies and the community.

How the study was conducted

On pub.dev More than 55,000 packages published. They help developers with tasks ranging from provider to http.

To highlight the most valuable packages and understand which ones require special attention, in 2020 Google proposed metric called Criticality Assessment. It is based on formulawhich looks like this:

Cpkg​=∑αi​1​i∑​αi​⋅log(1+max(Si​,Ti​))log(1+Si​)​

Si — metric (signal) value for a specific packet. This could be the number of stars on GitHub, the number of active contributors, or the frequency of updates.

αi​ — the weight of each metric. It reflects its importance for criticality assessment. For example, if the update rate is most important to us, its weight will be higher than that of other signals

max(Si​,Ti​) — maximum value for the signal. If a signal exceeds a certain threshold Ti​, its contribution to criticality is no longer increased. This is necessary to eliminate too large a spread of values ​​and to take into account only truly critical values.

(log⁡(1+Si)\log(1 + S_i)log(1+Si​)) is a logarithm that reduces the contribution of large values ​​so that they do not overlap other signals. For example, if one package has 10,000 stars and another has 1,000 stars, a difference of 10 times seems huge. But a package with 10,000 stars is not 10 times more important than a package with 1000.

Finally, the formula normalizes each signal relative to its threshold value max⁡(Si,Ti). This allows you to get values ​​in the range from 0 to 1 and makes the estimate more stable and independent of the growth of the number of packages in the ecosystem.

Algorithm measures the performance of the repository, not the package. To recap the difference: a repository is a container for code and its history, while a package is a unit of code that is intended to be reused.

The study included packages on pub.dev that were correctly associated with the GitHub repository and Dart repositories.

Estimates of the irreplaceability of GitHub repositories that contain Pub packages. 5750 packages have an irreplaceability level of 0.2.

Estimates of the irreplaceability of GitHub repositories that contain Pub packages. 5750 packages have an irreplaceability level of 0.2.

Third Party Packages

1. flutter_rust_bridge — makes it easier to interact between applications and code written in Rust.

flutter_rust_bridge integrates Rust code with Flutter applications. Rust is known for its security and performance. It is suitable for applications where stable operation and data security are critical.

The package automates routine tasks such as data serialization and deserialization and supports asynchronous calls. Thanks to it, applications become more responsive.

The package is updated regularly. It has solid documentation and an active community that helps new developers.

2. riverpod — manages state in applications. Riverpod separates state management logic from widgets. This simplifies the code structure and makes it more readable.

The Riverpod API provides tools for working with asynchronous data and streams and is suitable for applications that require processing data from the network or other sources.

Riverpod is easily expandable and customizable to suit the application's needs. It is updated frequently and has simple documentation.

3. bloc — manages the state of an application that uses the BLoC architectural pattern.

BLoC helps to separate business logic and user interface. The pattern uses threads to manage state – they help quickly respond to data changes. This is important for applications with dynamic content.

BLoC is also well suited for complex applications with many states and interactions. It has a developed ecosystem with documentation, libraries, and useful content.

4. frozen — makes it easier to work with immutable classes and boilerplate code generation.

The package makes it easy to create immutable classes. It helps to avoid errors that are associated with changes in the state of objects. Freezed automatically generates methods for copying objects with changing fields. Working with the state becomes safer.

The package allows you to create sealed classes that can represent several different states. This is especially useful for working with state in applications and handling different scenarios.

Freezed automatically generates toString(), hashCode methods and makes working with objects easier. For serialization, Freezed integrates with the json_serializable library, making it easy to convert objects to JSON and vice versa.

Freezed makes code more declarative and clearer. The package fully supports null safety Dart. It integrates well with other popular libraries in the Flutter ecosystem such as Riverpod and BLoC.

5. drift — designed for working with local databases. The package offers a simple API for working with SQLite. Supports reactive data feeds, allowing the user interface to automatically update as data changes in real time.

The package uses static typing, which allows you to catch errors at the compilation stage. The code becomes more reliable and debugging becomes easier.

Drift reduces boilerplate code and simplifies development. Allows you to use complex SQL queries: joins, subqueries and aggregations.

Drift has convenient tools for managing database migrations. The package's ecosystem includes clear documentation, instructions and guides for working with it.

Drift is considered a universal tool for state and data management because it easily integrates with other popular libraries in the Flutter ecosystem, such as Provider and Riverpod.

6. flutter_inappwebview — created for integrating web content into Flutter applications. The package provides a set of functions for working with web content, including JavaScript support, cookie management, and access to HTTP headers.

flutter_inappwebview uses native WebView components to ensure high performance and smooth content. The package allows you to interact with native APIs. This makes it easier to integrate web content with device functionality.

flutter_inappwebview offers many different events, such as page loading or URL changes. It makes it easy to monitor the state of web content and respond to changes in it.

Developers can customize the appearance and behavior of WebView. For example, add custom buttons, menus, and other interface elements.

7. archive — designed to work with file archives, ZIP and TAR. The package's API can be easily integrated into projects. It does not require additional dependencies. Due to its small size, the package can be used in mobile applications.

archive comes in handy when you need to process large files and data streams in real time.

8. get – Helps manage state, routing and dependencies. The package has a concise syntax and a minimalistic approach. Thanks to its flexibility and scalability, GetX can be used for both small projects and large applications.

get also has good documentation and an active community that helps newbies.

9. chopper — simplifies working with HTTP requests, offers a structured way to create RESTful API clients.

Chopper provides a user-friendly interface for working with RESTful APIs. It easily integrates with different data formats. For example, SON or XML.

Chopper supports plugins, so you can add other functions to it, such as error handling, authorization, caching. The package works well in conjunction with other popular libraries such as Dio and Retrofit.

10. file_picker — designed for selecting files and folders on user devices. The package has a convenient interface for working with the file system.

file_picker allows you to select files, directories, and supports filtering by file type.

The package easily integrates with other libraries and tools, such as image_picker. Developers can increase the number of features in applications. For example, you can customize the appearance and behavior of dialogs when you select files.

Packages from companies

1. sentry — monitors errors in applications. Easily integrates with GitHub, Slack and Jira. The package allows you to receive real-time error notifications. You can configure notifications based on different criteria. For example, for the most critical errors.

Sentry not only tracks errors, but also collects application performance data that can be used to identify bottlenecks and optimize code.

2. stream_video_flutter — offers tools for working with real-time video. The package is used in applications with video calls, video streaming or other interactive video services.

The package has a simple API for working with streaming video, so developers with minimal experience can work with it. The appearance and behavior of the video player can be customized. stream_video_flutter integrates with the Stream service, which offers various capabilities for working with video and chat in real time.

The package is community supported, so it has good documentation and integration examples. stream_video_flutter is regularly updated and improved.

3. flutter-permission-handler — simplifies permission management. The library supports different platforms, including Android and iOS. flutter-permission-handler requests and checks permissions to access the camera, microphone, location, and other phone features.

With this package, you don't need in-depth platform knowledge to integrate permission management into your app. The library allows you not only to request permissions, but also to check their statuses.

4. patrol — automates testing of applications using Flutter. The package allows you to write and run tests that simulate user interaction with the application.

5. melos – Manages projects with multiple packages. Melos makes working with monorepositories easy and offers tools to automate routine tasks such as building, testing, and publishing packages.

The library synchronizes dependencies between different packages, makes version management easier and reduces the likelihood of conflicts. Melos is a useful find for teamwork. You can quickly make changes to different packages and track changes across them.

The package quickly integrates into CI/CD processes. Applications are tested and deployed automatically.

6. supabase — offers tools for backend creation and data management. Often seen as an alternative to Firebase, but with an emphasis on using SQL and open standards.

Supabase is based on PostgreSQL. Supabase provides high performance and is easily scalable for applications of different sizes. Thanks to the Dart SDK, supavase can be quickly integrated with Flutter applications.

7. amplify_flutter — integrates AWS cloud services into mobile and web applications. The package was created as part of the Amazon Web Services (AWS) ecosystem. Amplify offers a set of tools for application development, including authentication, API (GraphQL and REST), file storage.

The Amplify SDK for Flutter has convenient APIs, so even a beginner can integrate cloud functions into the application. Applications on Amplify can scale quickly with AWS as the backend. This is important for growing projects.

8. flutter-geolocator — gives access to geolocation functions on mobile devices.

geolocator has a simple API for working with geolocation. The package determines the location, helps track its changes and obtain data on the speed of movement.

The package uses GPS, Wi-Fi and mobile networks. geolocator works well with other popular Flutter packages, such as google_maps_flutter.

flutter-geolocator is updated frequently. It has clear and extensive documentation. The developer community regularly publishes ways to solve various problems and answers questions from newcomers.

9. flutter_stripe — offers integration with the popular payment platform Stripe. The package supports different payment methods. It is updated regularly and easily integrates with the latest versions of Flutter and Stripe.

Beginning developers can quickly get started with flutter_stripe with clear documentation and tutorials with clear examples.

10. at_server — helps develop decentralized applications. Convenient APIs make it easy to store and retrieve information. at_server easily integrates with other services and libraries. The package allows you to work with data in real time.

Community Packages

1. plus_plugins — a set of plugins gives access to functions and APIs on the iOS and Android mobile platforms. Helps developers integrate native features into apps without native code.

plus_plugins is actively supported by the community. It is regularly updated, bugs are fixed, and new features are added. The package easily integrates with other Flutter tools and libraries.

2. Flame — the game engine offers a set of tools and libraries that make the development of 2D games easier and provide high performance.

The engine's intuitive API allows you to quickly start development and does not require deep knowledge. Flame is built on top of Flutter and uses the advantages of the framework: hot reloading, widgets, animation. Flutter's rendering capabilities provide high performance.

Flame offers many modules and plugins to add sound effects and other features to your games.

Flame has an active developer community that regularly publishes documentation, code examples, and answers questions.

3. dio — the library simplifies interaction with the RESTful API. The library supports asynchronous operations, making it ideal for handling network requests without blocking the main application thread.

Among the dio functions is support for different HTTP methods: GET, POST, PUT, DELETE.

dio helps process responses, including automatic JSON conversion. Supports cancellation of requests. This is useful in situations where the user leaves the screen or application. With Dio you can easily customize headers, parameters and timeouts for each request.

The library also supports interceptors that allow you to intercept requests and responses. This is useful when you need to add authentication tokens or handle errors.

4. audioplayers – Allows you to play and manage audio files. The library supports asynchronous operations. This means you can record and play audio without blocking the main application thread.

The community develops audioplayers, so the library has clear documentation, many examples of work, manuals, and regular updates.

5. photo_manager — gives access to photos and videos on users’ devices.

photo_manager supports asynchronous calls. This means that the main application thread will not block.

The library's developers regularly update it, add new features and fix bugs. Documentation and examples help you quickly understand the library's functions and integrate it into your projects.

Do you agree with the research results? Share your opinion in the comments!

Similar Posts

Leave a Reply

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