DEV Community

Cover image for Porting 16 BLoC & Signal Benchmark Apps to BlocSignal: Elevating Flutter UX & DX

Porting 16 BLoC & Signal Benchmark Apps to BlocSignal: Elevating Flutter UX & DX

๐Ÿš€ Ported Example Benchmark Suite Live on blocsignal.dev!

If youโ€™ve been evaluating BlocSignalโ€”the monorepo package bridging the predictable event-driven BLoC architecture with Rody Davis's reactive signals v7 primitivesโ€”weโ€™ve got something big to share.

We just launched a dedicated Ported Example Suite containing 16 full-featured, runnable benchmark applications adapted directly from the official felangel/bloc (10 apps) and rodydavis/signals.dart (6 apps) example repositories.

๐ŸŒ Explore the Live Benchmark Suite: https://blocsignal.dev/ported-examples


๐Ÿ’ก Why Port These Benchmark Apps?

State management benchmarks are best understood through real-world applications. By porting these established examples 1-to-1, developers can compare BlocSignal side-by-side with original implementations to see concrete architectural benefits:

1. Synchronous Frame Updates (Better Test DX)

In classic BLoC, state updates propagate asynchronously over microtask streams. In BlocSignal, emit() updates state synchronously on the exact same frame. This eliminates microtask queue latency, making widget building feel instant and allowing unit tests to assert expect(bloc.stateValue, ...) without pumpAndSettle or stream delays.

2. Reactive computed() Derivations (Zero Event Plumbing)

In complex apps like Todos or Dynamic Forms, classic BLoC often requires dispatching intermediate filter events or wiring up CombineLatestStream. With BlocSignal, you declare late final ReadonlySignal<List<Todo>> filteredTodos = computed(...) right inside the constructor. When state changes, downstream signals derive updated values reactively and lazily.

3. Streamless Event Concurrency Transformers (Lower Overhead)

Event concurrency transformers (sequential(), droppable(), restartable()) in BlocSignal are implemented as streamless higher-order functions using pure Dart Mutex locks. You get full request-cancellation and debouncing capabilities (e.g. in GitHub Search) with zero RxStream memory allocations.


๐Ÿ“ฆ What's Included in the Suite?

Ports from felangel/bloc (10 Applications)

  • โฑ๏ธ flutter_timer โ€” Ticker countdown with pause/resume & automatic teardowns
  • ๐Ÿ“ flutter_todos โ€” Flagship Todo CRUD app with computed reactive filters & stats
  • ๐ŸŒฆ๏ธ flutter_weather โ€” Weather search with temperature toggle & cross-cubit theme driving
  • ๐Ÿ”€ flutter_dynamic_form โ€” Cascading vehicle dropdowns (Brand โ†’ Model โ†’ Trim)
  • ๐Ÿช„ flutter_wizard โ€” Multi-step registration flow with step validation signals
  • โœ… flutter_form_validation โ€” Synchronous real-time input field validation
  • โšก bloc_concurrency_visualizer โ€” Interactive execution timeline for streamless transformers
  • ๐Ÿ” github_search โ€” Debounced repository search using restartable()
  • ๐Ÿ“‹ flutter_complex_list โ€” Multi-selection list, batch deletion & BlocSignalSelector rebuilds
  • ๐ŸŒŠ flutter_bloc_with_stream โ€” Stream interop via StreamBlocSignal & .toStream()

Ports from rodydavis/signals.dart (6 Applications)

  • ๐Ÿงฎ eval_calculator โ€” Expression parsing & arithmetic state machine
  • ๐ŸŽจ flutter_colorband โ€” Reactive RGBA color swatches & slider composition
  • ๐Ÿ”Œ get_it_signals โ€” Service locator DI integration with get_it
  • โณ flutter_async โ€” Async state handling (AsyncData, AsyncLoading, AsyncError)
  • ๐Ÿ—๏ธ clean_architecture โ€” 3-tier Presentation / Domain / Data architecture
  • ๐Ÿ’พ persist_shared_preferences โ€” State hydration with HydratedCubitSignal

Each card on blocsignal.dev/ported-examples features dual direct links pointing to both our BlocSignal monorepo source code and the original upstream source code on GitHub.

Check out the benchmark suite and let us know what you think! โญ๏ธ

๐Ÿ”— https://blocsignal.dev/ported-examples

Top comments (0)