hybrid_manager 0.0.2 copy "hybrid_manager: ^0.0.2" to clipboard
hybrid_manager: ^0.0.2 copied to clipboard

A hybrid state management library combining GetX and Riverpod.

⚡ Hybrid_manager #

A powerful yet lightweight state management solution for Flutter that combines the best of GetX and Riverpod. Use class-based or functional state handling, scoped overrides, and hot-reload-friendly APIs — all in one clean package.


✨ Features #

  • 🔁 Reactive<T> for reactive state (like GetX's Rx)
  • 🧠 MyStateNotifier<T> for class-based state logic (like Riverpod's StateNotifier)
  • 🌱 Provider<T> and ScopedProvider<T> for dependency injection and state scoping
  • 💡 watch() and read() for clean, functional state access
  • 🔄 Hot-reload friendly design
  • 🧪 Optional code generation for advanced performance
  • 🛠 CLI tooling support (coming soon)

🚀 Getting Started #

Add the package to your pubspec.yaml:

dependencies:
  your_package_name: ^0.0.1

Then run:

flutter pub get

🛠 Usage #

Functional Reactive State #

final counter = Reactive<int>(0);

counter.listen((value) => print('New value: $value'));

counter.value++; // prints: New value: 1

Class-based Notifier #

class CounterNotifier extends MyStateNotifier<int> {
  CounterNotifier() : super(0);

  void increment() => state++;
}

Register it:

final counterProvider = createNotifier(() => CounterNotifier());

Use it:

final counter = watch(counterProvider);

Scoped Overrides #

ProviderScope(
  overrides: [
    counterProvider.overrideWithValue(CounterNotifier()..state = 999),
  ],
  child: MyApp(),
);

🔮 Coming Soon #

  • 🧪 Built-in testing utilities
  • 🛠 CLI to scaffold providers/notifiers
  • 📦 Code generation annotations like @yourProvider

📄 License #

MIT License


👨‍💻 Author #

omJamnekar GitHub


🙌 Contributions #

Feel free to open issues or pull requests! Help improve this package and make Flutter state management more enjoyable.

1
likes
0
points
12
downloads

Publisher

unverified uploader

Weekly Downloads

A hybrid state management library combining GetX and Riverpod.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on hybrid_manager