<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Dr. E</title>
    <description>The latest articles on Forem by Dr. E (@flameofudun).</description>
    <link>https://forem.com/flameofudun</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3572782%2F8dc61368-a301-457a-a154-0cf0f0d1eb23.png</url>
      <title>Forem: Dr. E</title>
      <link>https://forem.com/flameofudun</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/flameofudun"/>
    <language>en</language>
    <item>
      <title>Flutter ECS: Mastering Async Operations and Complex Workflows</title>
      <dc:creator>Dr. E</dc:creator>
      <pubDate>Sun, 11 Jan 2026 19:53:43 +0000</pubDate>
      <link>https://forem.com/flameofudun/flutter-ecs-mastering-async-operations-and-complex-workflows-463g</link>
      <guid>https://forem.com/flameofudun/flutter-ecs-mastering-async-operations-and-complex-workflows-463g</guid>
      <description>&lt;h2&gt;
  
  
  Part  2 — Mastering Async Operations and Complex Workflows
&lt;/h2&gt;

&lt;p&gt;Flutter ECS just got seriously practical. This new article takes the abstract ideas from Part 1 and shows how to use an Event-Component-System architecture to tame real-world async workflows in production Flutter apps.&lt;/p&gt;

&lt;p&gt;Why this article matters&lt;br&gt;
Focuses on the messy realities of production apps: API failures, multi-step auth flows, race conditions, and error handling, not just counter examples.&lt;/p&gt;

&lt;p&gt;Shows how to model async work with a LoadingState enum (idle/running/success/error) and keep loading, success, and error logic in a single, coherent system.&lt;/p&gt;

&lt;p&gt;Demonstrates how ECS can replace bloated BLoCs with a smaller set of predictable, testable systems.&lt;/p&gt;

&lt;p&gt;What you’ll learn&lt;br&gt;
How to pass contextual data through events using triggerWith...() methods, then safely clear it with clearData() to keep events reusable and stateless by default.&lt;/p&gt;

&lt;p&gt;How to do dependency injection “the ECS way” by treating services as components, declared once in the feature constructor for explicit, traceable architecture.&lt;/p&gt;

&lt;p&gt;How to build a complete async flow (fetch user, shopping cart, checkout, etc.) where a single reactive system owns loading, success, and error transitions.&lt;/p&gt;

&lt;p&gt;Patterns you can steal today&lt;br&gt;
Use reactsIf to prevent duplicate operations, enforce prerequisites (auth, business hours, cart not empty), or react only to significant state changes.&lt;/p&gt;

&lt;p&gt;Batch component updates with notify: false to avoid unnecessary rebuilds, then trigger a single final update for optimal performance.&lt;/p&gt;

&lt;p&gt;Implement robust retry logic with capped attempts and exponential backoff inside a system, keeping error recovery centralized and predictable.&lt;/p&gt;

&lt;p&gt;Production-ready examples included&lt;br&gt;
A full shopping cart feature: components, events, systems, checkout flow, error handling, and cross-feature communication (e.g., pulling payment info from another feature).&lt;/p&gt;

&lt;p&gt;UI integration via ECSWidget and ecs.watch(), showing exactly how to wire loading, error, and data components into real screens.&lt;/p&gt;

&lt;p&gt;Call to action&lt;br&gt;
If you’re hitting the limits of your current state management (bloated BLoCs, tangled async code, scattered error handling), this piece is a concrete blueprint for refactoring toward a predictable, testable, and debuggable async architecture with Flutter ECS.&lt;/p&gt;

&lt;p&gt;👉 Read: Flutter ECS: &lt;a href="https://medium.com/@dr.e.rashidi/flutter-ecs-mastering-async-operations-and-complex-workflows-af558143bef9" rel="noopener noreferrer"&gt;Mastering Async Operations and Complex Workflows&lt;/a&gt;. Then try the challenge: build your own shopping cart feature with retries, loading states, and inspector-friendly debugging, backed by the open-source &lt;a href="https://github.com/FlameOfUdun/flutter_event_component_system" rel="noopener noreferrer"&gt;flutter_event_component_system &lt;/a&gt;package on GitHub.&lt;/p&gt;

</description>
      <category>flutter</category>
      <category>dart</category>
      <category>programming</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Flutter ECS: Rethinking State Management for Flutter Apps</title>
      <dc:creator>Dr. E</dc:creator>
      <pubDate>Sat, 18 Oct 2025 16:31:10 +0000</pubDate>
      <link>https://forem.com/flameofudun/flutter-ecs-rethinking-state-management-for-flutter-apps-45hf</link>
      <guid>https://forem.com/flameofudun/flutter-ecs-rethinking-state-management-for-flutter-apps-45hf</guid>
      <description>&lt;p&gt;Hey everyone 👋&lt;/p&gt;

&lt;p&gt;After years of building production Flutter apps, I kept running into the same problem: as projects grew, state management got messy.&lt;/p&gt;

&lt;p&gt;What started as clean architecture would eventually turn into a tangled web of dependencies. Business logic leaking into widgets, tightly coupled components, and tests that were painful to maintain.&lt;/p&gt;

&lt;p&gt;I tried everything: Provider, Riverpod, BLoC, GetX, etc. All great in their own ways, but none gave me the modularity and scalability I was looking for.&lt;/p&gt;

&lt;p&gt;So, I built something new: Event–Component–System.&lt;/p&gt;

&lt;p&gt;A Flutter package for radical separation of concerns:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Components: Pure data, no logic&lt;/li&gt;
&lt;li&gt;Systems: Pure logic, no data&lt;/li&gt;
&lt;li&gt;Events: Communication without coupling&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It’s not just another state management library. it’s a new way to structure your app.&lt;/p&gt;

&lt;p&gt;If you’re curious about the reasoning and the journey behind it, checkout my detailed article here:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://dev.tourl"&gt;https://medium.com/@dr.e.rashidi/flutter-ecs-rethinking-state-management-for-flutter-apps-bd224da10881&lt;/a&gt;&lt;/p&gt;

</description>
      <category>flutter</category>
      <category>dart</category>
      <category>mobile</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
