Flutter State Management in 2026: Riverpod vs Bloc vs Signals

Riverpod, Bloc, and Signals compared for Flutter state management in 2026 — boilerplate, testability, rebuild granularity, and when to pick each.

Flutter State Management in 2026: Riverpod vs Bloc vs Signals
On this page

Every new Flutter project starts the same way: you get the widgets on screen, everything’s a StatefulWidget with a setState call, and it works fine — until it doesn’t. Two screens need the same data. A form needs to survive a rebuild. Someone on the team asks “how do we test this?” and you realize setState was never going to scale past a todo app. That’s the point where you have to actually pick a state management approach, and in 2026 the honest answer isn’t “just use Provider” anymore. It’s a real three-way decision between Riverpod, Bloc, and the newer Signals package, and each one optimizes for something different.

This isn’t a widget tutorial — if you need the StatelessWidget/StatefulWidget basics first, that’s a different post. This is for the point past that, where you’re picking the library that’s going to shape every screen you build for the next two years.

Why the state management decision still matters in 2026

Flutter shipped setState, InheritedWidget, and eventually first-party ValueNotifier/ChangeNotifier support years ago, and none of it went away. What changed is that the ecosystem consolidated hard around three approaches that each solve the same underlying problem — keeping UI in sync with data — with different trade-offs on compile-time safety, boilerplate, and how granularly the framework decides what to rebuild.

Get this wrong on a small app and you barely notice. Get it wrong on a codebase with 40 screens, a team of six, and a CI pipeline that needs fast, reliable tests, and you’re stuck rewriting your data layer eighteen months in. That’s the real cost, and it’s why “just pick whatever” is bad advice once a project is going to outlive its first sprint.

Flutter state management comparison overview showing Riverpod, Bloc, and Signals architecture

Riverpod in 2026: providers, codegen, and compile-safe DI

Riverpod is the spiritual successor to Provider, rebuilt from scratch to fix Provider’s biggest flaw: runtime errors when you reference a provider that doesn’t exist in the widget tree. Riverpod moved that check to compile time by decoupling providers from BuildContext entirely — providers are declared as global (but still testable and overridable) objects, not tied to a specific widget’s position in the tree.

By 2026, the default way to write Riverpod is with code generation via riverpod_generator and the @riverpod annotation, not the older manual StateNotifierProvider boilerplate:

// counter_provider.dart
import 'package:riverpod_annotation/riverpod_annotation.dart';

part 'counter_provider.g.dart';

@riverpod
class Counter extends _$Counter {
  @override
  int build() => 0;

  void increment() => state++;
  void decrement() => state--;
}
// counter_screen.dart
class CounterScreen extends ConsumerWidget {
  @override
  Widget build(BuildContext context, WidgetRef ref) {
    final count = ref.watch(counterProvider);
    return Scaffold(
      body: Center(child: Text('$count')),
      floatingActionButton: FloatingActionButton(
        onPressed: () => ref.read(counterProvider.notifier).increment(),
        child: const Icon(Icons.add),
      ),
    );
  }
}

That’s it — no Provider<T> wiring at the app root beyond wrapping main() in a ProviderScope, no manual dispose() calls for most cases, and ref.watch gives you fine-grained rebuilds: only widgets that actually read counterProvider rebuild when it changes, nothing above them in the tree.

What Riverpod buys you: compile-time safety (typos in provider names are build errors, not runtime crashes), painless dependency overrides for testing, built-in caching and auto-dispose for async providers (FutureProvider, StreamProvider), and a mental model that scales from a single counter to complex dependency graphs without a redesign.

What it costs you: code generation means a build_runner step in your workflow, which slows down iteration on large codebases and adds a class of “did I forget to regenerate” bugs. The annotation-based API is also a real learning curve if your team has only seen ChangeNotifier-style Provider before.

Bloc/Cubit in 2026: predictable events and the boilerplate tax

Bloc takes a fundamentally different bet: state changes should be explicit, unidirectional, and traceable as a sequence of discrete events. Every state transition happens in response to an event you dispatch, and the Bloc (or its simplified cousin, Cubit) is the only thing allowed to turn that event into a new state.

// counter_cubit.dart
class CounterCubit extends Cubit<int> {
  CounterCubit() : super(0);

  void increment() => emit(state + 1);
  void decrement() => emit(state - 1);
}
// counter_screen.dart
class CounterScreen extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return BlocProvider(
      create: (_) => CounterCubit(),
      child: Scaffold(
        body: Center(
          child: BlocBuilder<CounterCubit, int>(
            builder: (context, count) => Text('$count'),
          ),
        ),
        floatingActionButton: FloatingActionButton(
          onPressed: () => context.read<CounterCubit>().increment(),
          child: const Icon(Icons.add),
        ),
      ),
    );
  }
}

For anything beyond a Cubit — the full Bloc<Event, State> class — you add an explicit event type and a mapping from event to state:

sealed class CounterEvent {}
class Increment extends CounterEvent {}
class Decrement extends CounterEvent {}

class CounterBloc extends Bloc<CounterEvent, int> {
  CounterBloc() : super(0) {
    on<Increment>((event, emit) => emit(state + 1));
    on<Decrement>((event, emit) => emit(state - 1));
  }
}

That’s noticeably more ceremony than the Riverpod version for the same counter — an event class per action, a handler registration per event, a BlocProvider wrapping the widget tree. That’s the boilerplate tax people complain about, and it’s real. But it buys something specific: every state change in the app is an named, loggable event. BlocObserver gives you a single hook to log, replay, or time-travel-debug every transition in the entire app, which is genuinely hard to replicate with ad-hoc state mutation.

What Bloc buys you: the strictest discipline of the three — state changes are impossible to make outside the declared event → state mapping, which makes large teams and complex business logic easier to reason about and code-review. It also has the most mature testing story in the ecosystem (bloc_test), because “given this state and this event, expect this sequence of states” maps directly onto how the library already thinks.

What it costs you: boilerplate, especially for simple screens where a Cubit’s leaner API still feels heavier than a Riverpod provider or a raw signal. There’s also a real onboarding cost — the event-driven model takes longer to click for developers coming from a setState background.

Signals for Flutter: the newest contender

Signals is the newest of the three, ported from the reactive-programming pattern popularized in SolidJS and Preact and adapted for Dart via the signals_flutter package. Where Riverpod and Bloc both route through a provider concept sitting outside the widget, a signal is just a reactive value — you read it, and any UI that read it during its last build automatically subscribes to future changes, with no watch/ref ceremony and no BlocBuilder wrapper.

// counter_signal.dart
import 'package:signals/signals_flutter.dart';

final counter = signal(0);
// counter_screen.dart
class CounterScreen extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(child: Watch((context) => Text('${counter.value}'))),
      floatingActionButton: FloatingActionButton(
        onPressed: () => counter.value++,
        child: const Icon(Icons.add),
      ),
    );
  }
}

No provider setup, no event classes, no part file, no build_runner step. Watch (or the .watch(context) extension) tracks exactly which signals were read during that build and rebuilds only when those specific values change — automatic fine-grained reactivity without you declaring dependencies by hand.

Derived state is a computed() signal that recalculates only when its own dependencies change:

final firstName = signal('Ada');
final lastName = signal('Lovelace');
final fullName = computed(() => '${firstName.value} ${lastName.value}');

What Signals buys you: the least boilerplate of the three by a wide margin, genuinely automatic fine-grained reactivity (not just “watch this one provider” — the dependency graph is inferred from what you actually read), and a mental model that’s close to spreadsheet cells, which a lot of developers find immediately intuitive.

What it costs you: it’s the newest of the three, with a smaller ecosystem, fewer Stack Overflow answers, fewer battle-tested large-scale case studies, and none of Bloc’s built-in event-log discipline. Testability is solid — a signal is just a value you can set and assert against — but the tooling around it (dedicated test helpers, static analysis lints) is younger and less standardized than bloc_test or Riverpod’s ProviderContainer-based test harness.

Side-by-side boilerplate comparison of Riverpod, Bloc, and Signals counter implementations

Boilerplate, testability, and rebuild granularity compared

Here’s the same three axes lined up side by side, based on the counter examples above and how each library behaves at larger scale:

Riverpod Bloc/Cubit Signals
Lines for a simple counter ~10 (with codegen) ~15 (Cubit) / ~20+ (Bloc) ~6
Extra build step Yes (build_runner) No No
Rebuild granularity Fine — per ref.watch call Coarse-ish — per BlocBuilder region Finest — per signal read
Testing story Strong (ProviderContainer overrides) Strongest (bloc_test, explicit event/state pairs) Solid but younger tooling
Debuggability / traceability Good (provider inspector) Best (named events, BlocObserver, time-travel) Good but implicit (no event log by default)
Learning curve Medium (annotations, codegen mental model) Medium-high (event-driven discipline) Low (closest to plain variables)
Ecosystem maturity (2026) Very mature, community standard Very mature, enterprise-favored Newer, growing fast

None of these numbers move much for a counter app — the differences show up once you’re managing a dozen interdependent pieces of state, at which point Riverpod’s dependency graph, Bloc’s event log, or Signals' automatic tracking each pay off in a different way.

Testability in practice: what actually changes in your test files

Testability is the argument that decides a lot of team-level choices, so it’s worth being concrete about what each approach’s test actually looks like.

With Bloc, a test is a direct statement of the event-driven contract:

blocTest<CounterCubit, int>(
  'emits 1 when increment is called',
  build: () => CounterCubit(),
  act: (cubit) => cubit.increment(),
  expect: () => [1],
);

With Riverpod, you spin up an isolated ProviderContainer, optionally overriding dependencies, and assert on the resulting state:

test('counter increments', () {
  final container = ProviderContainer();
  addTearDown(container.dispose);

  container.read(counterProvider.notifier).increment();
  expect(container.read(counterProvider), 1);
});

With Signals, there’s no framework object to construct at all — a signal behaves like a plain value under test:

test('counter increments', () {
  final counter = signal(0);
  counter.value++;
  expect(counter.value, 1);
});

Signals wins on raw simplicity here. Bloc wins on expressiveness for complex sequences — asserting an exact ordered list of states in response to a sequence of events is something bloc_test was purpose-built for, and it shows. Riverpod sits in between: not as terse as a signal test, but its override mechanism makes swapping in fakes for async dependencies (repositories, API clients) unusually clean.

When to pick which in 2026

  • Pick Bloc if you’re on a larger team, the app has genuinely complex business logic with many possible state transitions, and you want an audit trail of every state change for debugging or compliance reasons. The boilerplate is the price of that discipline, and for teams past a certain size it’s worth paying.
  • Pick Riverpod if you want compile-time safety, a mature ecosystem, and a dependency-injection story that scales cleanly — especially if your app leans on async data (network calls, streams) where FutureProvider/StreamProvider and auto-dispose save real effort. It’s the closest thing to a default recommendation for a new mid-to-large Flutter app in 2026.
  • Pick Signals if you’re optimizing for developer velocity on a smaller team, you want the least ceremony between “I have a value” and “the UI updates when it changes,” and you’re comfortable being on a younger library with a smaller (but fast-growing) support ecosystem. It’s also a strong fit for gradually migrating a setState-heavy legacy screen, since a signal can slot in without restructuring the surrounding widget tree.

None of these are permanent commitments at the whole-app level, either. It’s increasingly common to see Riverpod handle app-wide dependency injection and async data loading while individual screens use signals for fast-moving local UI state like animation progress or form field values — the approaches aren’t mutually exclusive, and mixing them at clear boundaries is a legitimate 2026 pattern, not a code smell.

Decision flowchart for choosing between Riverpod, Bloc, and Signals in Flutter

Common gotchas across all three

  • Riverpod: forgetting to run build_runner watch during development means you’re staring at stale generated code and wondering why your provider “doesn’t exist.” Also, overusing ref.watch inside methods instead of build() causes unnecessary rebuild subscriptions — use ref.read outside of build.
  • Bloc: emitting state directly instead of through emit() inside an event handler, or holding onto a stale BuildContext across an async gap before calling context.read(), are the two most common bug reports in Bloc-based codebases.
  • Signals: reading a signal’s .value outside of a Watch/.watch(context) context (say, in a plain build() without wrapping) silently doesn’t subscribe to updates — the UI just won’t rebuild, and it’s easy to miss in code review since the code still compiles and runs.

FAQ

Is Provider still worth using in 2026? Not for new projects. Riverpod is a strict superset of what Provider does well, with compile-time safety Provider never had. Provider is still fine in legacy codebases that already use it extensively, but there’s no reason to start a new app on it.

Can I use Bloc and Riverpod in the same app? Technically yes, but it’s not recommended — you end up maintaining two separate dependency-injection and state-observation systems, which defeats the purpose of picking either one. Mixing Riverpod with Signals for local UI state is a more common and more defensible combination.

Is Signals production-ready? Yes, for teams comfortable with a newer library. It’s used in production apps as of 2026, but it has a smaller community than Riverpod or Bloc, so expect to solve more edge cases yourself rather than finding an existing Stack Overflow answer.

Which one has the best performance? All three can achieve fine-grained rebuilds when used correctly. Signals has the tightest default granularity since tracking is automatic and per-value. Riverpod gets there with correct select() usage on providers. Bloc gets there by scoping BlocBuilder widgets tightly and using buildWhen to filter irrelevant rebuilds. Badly used, any of the three can over-rebuild — the library isn’t a substitute for understanding what triggers a rebuild in your specific screen.

Do I need code generation for Riverpod? No, but it’s the recommended default in 2026. You can still write providers manually without @riverpod annotations if you want to avoid the build_runner step, at the cost of more verbose provider declarations and losing some of the compile-time inference the generator provides.

Closing thought

There isn’t a wrong answer among these three anymore — that’s actually the good news buried in what looks like a harder decision than it used to be. Bloc, Riverpod, and Signals are all mature enough (or, for Signals, mature-and-growing-fast enough) to carry a real production app. The actual decision is about which trade-off matches your team: discipline and traceability, compile-safety and ecosystem maturity, or minimum ceremony and fastest iteration. Pick based on that, not on which one trended on r/FlutterDev last week — and don’t be afraid to mix them at clean boundaries once you understand what each one is actually good at.

Share X / Twitter LinkedIn
Previous Flutter What's New in Flutter 3.44 and Dart 3.12: Agentic Hot Reload and Genkit AI

Keep reading