Member-only story

CQRS Part of Google’s Recommended Flutter Feature App Architecture

Fred Grott
4 min readFeb 26, 2023

--

This is a bit raw, but it is how one would implement CQRS in Flutter Apps to become one of the vertical slices of the Google’s recommended Flutter Feature DDD app architecture. I found Andrew’s Jaguar-Dart CQRS package source and modified that to implement CQRS in flutter apps. CQRS is command query responsibility segregation and separates the read and write crud operations.

Feature (Vertical Slices) DDD is one of the variants, one of the other ones is hexagonal. Usually, Feature (Vertical Slices) DDD is a better fit for MVVM application architecture as the vertical slices of both event bus and CQRS as it decouples the UI and domain layers.

Implementing CQRS

I modified Andrew’s CQRS package source:

There is a set of domain event value objects that track through aggregate, so we have a ForAggregate interface:

--

--

Fred Grott
Fred Grott

No responses yet