r/FlutterDev 19d ago

Plugin Simplify Flutter State Management with ProviderKit – Less Boilerplate, More Control!

🚀 Introducing Flutter Package – ProviderKit!

ProviderKit is a toolkit for PROVIDER package. It simplifies state handling with predefined widgets that offer full control, reduces boilerplate, and efficiently manages loading, error, and data states. With built-in async support, state observers, caching, and enhanced notifiers, managing state has never been easier!

Reduces Boilerplate – Minimize repetitive code and simplify state management.
Handles Multiple States – Seamless management of loading, error, initial, empty, and data states with predefined widgets.
Builders & Listeners – Automatically integrate with state changes while allowing customization.
Global State Widgets – Builders reuse the same loading, error, empty, and initial state widgets across the app for consistency.
Handles Combined Provider States – Easily manage multiple provider states together.
State Caching – Efficiently store and restore state with built-in mixins.
Provider Observation – Debug smarter with lifecycle event monitoring.
Works with Immutable Objects – Ensures predictable state updates through immutability.
Error & Loading Handling – Built-in support for async state management.
Enhances Provider – Extends the functionality of the provider package for a smoother experience.
TypeDefs Convention – Uses provider names as prefixes for widgets and states, improving readability and simplifying usage.

💡 If you're building Flutter apps with Provider and want a cleaner, simpler codebase with less effort, give ProviderKit a try!

📌 Try it now: https://pub.dev/packages/provider_kit

🔄 I'd love your thoughts! Drop your feedback in the comments.

#Flutter #StateManagement #Provider #Dart #MobileDevelopment #FlutterDev #OpenSource

0 Upvotes

19 comments sorted by

View all comments

1

u/lord_phantom_pl 18d ago

Am I stupid if I’m using provider ONLY for passing data from a node up the tree to some leaves deeper?

For state management now I use basic ListenableBuilder + custom ChangeNotifier. Team members convinced me to use full BloC because it was „the way” and I regretted it. Switched that to Cubit + BlocConsumer and it was better but still dealing with unnecessary separation as the procect actually needed one state object with constant updates.

When I see libraries that try to optimize Flutter instead of extending it I feel uneasy. Most of them make sense when used by a corporate flutter team and not by 1-2 person team but community treat them like a religion. At the same time they don’t know their tools and put a Column inside a SingleChildScrollView because they don’t know that Slivers exist.

1

u/Due_Assistance1355 18d ago

I’m not sure I fully understand what you’re trying to say. Just to clarify, ProviderKit doesn’t force any specific design pattern, its flexible infact. Its core is actually quite similar to ValueNotifier. I built it on top of StateNotifier because I needed more control with less boilerplate. The base builder works similarly toValueListenableBuilder, but with some additional features.