Inherited RxDart is a state management library that combine the power of InheritedWidget and RxDart, a simple and elegant state management solution for apps of any scale.
Alternatives To Inherited_rxdart
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Bloc10,2232101643 days ago112August 14, 202287mitDart
A predictable state management library that helps implement the BLoC design pattern
Getx8,25619210 days ago310August 08, 2022798mitDart
Open screens/snackbars/dialogs/bottomSheets without context, manage states and inject dependencies easily with Get.
Provider4,6846153127 days ago59May 22, 202218mitDart
InheritedWidgets, but simple
2 days ago109mitDart
A simple way to access state while robust and testable.
Mobx.dart2,25332475 days ago112September 20, 202264mitDart
MobX for the Dart language. Hassle-free, reactive state-management for your Dart and Flutter apps.
Flutter Boilerplate Project1,877
5 months ago29mitDart
A boilerplate project created in flutter using MobX and Provider.
3 months agoMakefile
Design pattern designed to standardize your projects with GetX on Flutter.
Flutter Provide7632923 years ago3February 22, 201910otherDart
A simple framework for state management in Flutter.
States_rebuilder4781123 months ago78June 13, 20229otherDart
a simple yet powerful state management technique for Flutter
Cubit44563 years ago18July 06, 2020mitDart
Cubit is a lightweight state management solution. It is a subset of the bloc package that does not rely on events and instead uses methods to emit new states.
Alternatives To Inherited_rxdart
Select To Compare

Alternative Project Comparisons

pub package

A simple state management solution that combine the power of inherited widget and rxdart


Create state management logic for your app using multitude of blocs, which internal is just stream and rxdart, you can access them anywhere in your widget tree when provided using providers.

Getting started

Started by providing blocs and service for your widget's subtree like this:

First import it:

import 'package:inherited_rxdart/inherited_rxdart.dart';

Create your bloc and state:

class MyState {
  final int number;
  final String text;

  const MyState({required this.number, required this.text});

  MyState copyWith({int? number, String? text}) {
    return MyState(number: number ?? this.number, text: text ?? this.text);

// Define bloc with two type:
// MyState: State of the bloc
// String: Type of notification
class CounterBloc extends RxBloc<MyState, String> {
  CounterBloc(MyState initialState) : super(initialState);

  void showDialog() {
    // will notify all notification listeners

  void changeText(String newText) {
    // will cause dependent to rebuild
    state = state.copyWith(text: newText);

  void increase() {
    // will cause dependent to rebuild
    state = state.copyWith(number: state.number + 1);

  void decrease() {
    // will cause dependent to rebuild
    state = state.copyWith(number: state.number - 1);

And start using it in your app:

class App extends StatelessWidget {
  const App({Key? key}) : super(key: key);

  Widget build(BuildContext context) {
    return MaterialApp(
        home: RxProvider<CounterBloc>(
          create: () => CounterBloc(const MyState(text: "hi", number: 0)),
          child: MyHomePage(),

Access them anywhere in your subtree with:

final bloc = RxProvider.of<CounterBloc>(context);


View documents of each API for more details. The library support bloc pattern and view model pattern for your app.

Bloc's Widgets

For blocs, there will be specific widget for each purpose include: rebuilding, listening,...

  • RxBuilder: For building widgets based on states.
  • RxListener: For listening to state changes and notifications.
  • RxStateListener: For listening to state changes only.
  • RxConsumer: Combination of RxListener and RxBuilder.
  • RxStateConsumer: Combination of RxStateListener and RxBuilder.
  • RxSelector: For selectively rebuilding widgets based on specific property of state.


A simple bloc, which will emit states throughout its life-cycle and rebuild widgets when necessary. Work with:

  • RxBuilder
  • RxSelector
  • RxStateConsumer
  • RxStateListener


Bloc with notification beside states, which can be listened and react accordingly. Work with:

  • RxBuilder
  • RxListener
  • RxStateListener
  • RxConsumer
  • RxStateConsumer
  • RxSelector


For simple view model based state-management, shipped with related widget:

  • RxViewModelBuilder: for handle rebuilding widget when a new state is emitted.
  • RxViewModelSelector: for selectively rebuilding when state changed.
  • RxViewModelListener: for a listener callback when state changed.
  • RxViewModelConsumer: combination of builder and listener.


A value for reactive state management, will cause its dependent to rebuild when its value is set.

  • RxValueBuilder: build to work with RxValue.


There's also simple service provider for repo or simply to inject an instance through a widget subtree.

  • ServiceProvider

Register global Singleton

Though not really inherited, this library do provide the use of register an instance through GetIt, and use them in builders, listeners .value constructor. This feature can be access with RxProvider static method


Mixin to add event dispatch capability to RxCubit/RxBloc and register a callback to those event.

By default, there's only one stream from RxCubit/RxBloc and that is RxBase.stateStream, this stream would output states to rebuild ui.

This mixin introduce another stream from ui to RxCubit/RxBloc that can be used to handle an event type and a subtype of it. Which each can be transformed using StreamTransformer.

Additional information

To provide multiple blocs/view model/service instances, the use of these widget is encouraged:

  • RxMultiProvider
  • MultiServiceProvider

To quickly access blocs/services, rather than use these function:


One can use:<MyBloc>(); // for getting an instance of a bloc / view model and subscribe to it's changes.<MyBloc>(); // for getting an instance of a bloc/view model
context.get<MyService>(); //for getting an instance of a service. 


final text = RxValue<String>("hello");

Is equivalent to:

final text = "hello".rx;
Popular State Management Projects
Popular Flutter Projects
Popular User Interface Categories
Related Searches

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
State Management