<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Uroš Radulović on Medium]]></title>
        <description><![CDATA[Stories by Uroš Radulović on Medium]]></description>
        <link>https://medium.com/@uroradulovi?source=rss-5a11c36c56b8------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*LUvqo1FvFB8r1QxA.</url>
            <title>Stories by Uroš Radulović on Medium</title>
            <link>https://medium.com/@uroradulovi?source=rss-5a11c36c56b8------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 06:26:41 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@uroradulovi/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[A/B Testing in Flutter: Building Reliable Experiments with Firebase and BLoC]]></title>
            <link>https://medium.com/@uroradulovi/a-b-testing-in-flutter-building-reliable-experiments-with-firebase-and-bloc-ab3e8b8dfb8f?source=rss-5a11c36c56b8------2</link>
            <guid isPermaLink="false">https://medium.com/p/ab3e8b8dfb8f</guid>
            <category><![CDATA[testing]]></category>
            <category><![CDATA[dart]]></category>
            <category><![CDATA[software-architecture]]></category>
            <category><![CDATA[firebase]]></category>
            <category><![CDATA[flutter]]></category>
            <dc:creator><![CDATA[Uroš Radulović]]></dc:creator>
            <pubDate>Wed, 21 Oct 2026 12:06:37 GMT</pubDate>
            <atom:updated>2026-10-21T12:06:37.256Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BwZV5P6YC0rjKMhayPdt9w.png" /></figure><p><em>How to design maintainable experiments, manage Remote Config safely, instrument analytics, and test different user experiences in Flutter.</em></p><p>As Flutter developers, we spend a lot of time improving our applications.</p><p>We refactor widgets, optimize performance, redesign screens, and ship new features. We write tests, review pull requests, and make sure everything works as expected.</p><p>But there’s one question that often gets overlooked:</p><p><strong>How do we know whether the changes we’re shipping actually improve the user experience?</strong></p><p>Imagine we’re working on an application with a five-step onboarding process.</p><p>Our team believes that reducing the flow to three steps will increase onboarding completion.</p><p>From an engineering perspective, implementing the new screens is relatively straightforward.</p><p>But should we immediately replace the existing implementation?</p><p>What if the shorter onboarding increases completion rates but negatively affects retention? What if the improvement is too small to justify the change?</p><p>Instead of relying on assumptions, we can run an A/B test.</p><p>In this article, we’ll build an experimentation implementation using Flutter, Firebase Remote Config, Firebase A/B Testing, Firebase Analytics, and Cubit.</p><p>We’ll focus on practical engineering challenges rather than simply switching between two widgets.</p><h3>1. Defining the Experiment</h3><p>Let’s start with a hypothetical application.</p><p>We currently have a five-step onboarding flow, and we want to compare it against a three-step alternative.</p><p>VariantExperienceControlExisting five-step onboardingTreatmentNew three-step onboarding</p><p>Our hypothesis is:</p><p><em>Reducing onboarding from five steps to three will improve onboarding completion without significantly harming seven-day retention.</em></p><p>We’ll measure three categories of metrics.</p><p><strong>Primary metric:</strong> Percentage of users completing onboarding.</p><p><strong>Secondary metric:</strong> Time required to complete onboarding.</p><p><strong>Guardrail metrics:</strong> Seven-day retention and application stability.</p><p>Before launching, we’d also define the eligible user population, observation window, sample-size requirements, and minimum improvement worth shipping.</p><p>An important detail: an A/B test is not simply a comparison of two implementations.</p><p>It’s a controlled experiment where users are randomly assigned to different experiences and outcomes are measured consistently.</p><h3>2. Designing the Flutter Architecture</h3><p>The simplest implementation could look like this:</p><pre>final isShortOnboarding =<br>FirebaseRemoteConfig.instance.getBool(&#39;short_onboarding&#39;);<br><br>return isShortOnboarding<br>  ? const ShortOnboarding()<br>  : const StandardOnboarding();</pre><p>For a prototype, this might be sufficient.</p><p>But I wouldn’t scatter this pattern throughout a larger Flutter codebase.</p><p>It creates direct Firebase dependencies in the presentation layer and makes configuration timing, testing, and experiment cleanup harder to manage.</p><p>Instead, we’ll use a few well-defined boundaries.</p><pre>Firebase A/B Testing<br>                |<br>       Firebase Remote Config<br>                |<br>                v<br>        ExperimentRepository<br>                |<br>                v<br>          OnboardingCubit<br>           /         \<br>          /           \<br> OnboardingRepo     Analytics<br>          \           /<br>           \         /<br>          OnboardingState<br>                |<br>            BlocBuilder<br>                |<br>         +------+------+<br>         |             |<br>      Control       Treatment<br>      Onboarding    Onboarding</pre><p>The responsibilities are straightforward.</p><p><strong>ExperimentRepository</strong> resolves a typed experiment decision and controls Remote Config activation.</p><p><strong>OnboardingCubit</strong> manages feature state, progress, and completion.</p><p><strong>OnboardingRepository</strong> handles the actual business operation required to complete onboarding.</p><p><strong>OnboardingAnalytics</strong> records meaningful events.</p><p><strong>Flutter widgets</strong> render the selected experience.</p><p>Notice that we aren’t introducing a separate Cubit just to store one experiment flag.</p><p>Our variant is part of the onboarding feature’s state, so we’ll manage it there.</p><h3>3. Firebase Setup</h3><p>We’ll assume Firebase is already configured using FlutterFire.</p><p>Install the required dependencies:</p><pre>flutter pub add firebase_core<br>flutter pub add firebase_remote_config<br>flutter pub add firebase_analytics<br>flutter pub add flutter_bloc<br>flutter pub add get_it</pre><p>In Firebase Remote Config, create this parameter:</p><pre>Parameter: onboarding_variant<br>Default: control<br>Variants:<br>  control<br>  short</pre><p>Then create an experiment in Firebase A/B Testing.</p><p>Use the parameter onboarding_variant with a control and treatment group.</p><p>For this example, we’ll use equal variant weights.</p><p>Firebase handles experiment assignment, while Flutter consumes the assigned parameter value.</p><h3>Understanding assignment</h3><p>Firebase Remote Config A/B Testing assigns eligible installations to variants using the experiment ID and Firebase installation ID.</p><p>Assignments persist while the experiment is active, but installation-level assignment isn’t equivalent to user-account-level assignment.</p><p>For example, a user signing in on two different devices could receive different variants.</p><p>For our onboarding experiment, that’s acceptable.</p><p>If we needed consistent assignments across multiple devices or platforms, we’d consider a backend-owned experimentation service.</p><h3>4. Using Strongly Typed Experiment Values</h3><p>One thing I try to avoid is passing raw Remote Config strings throughout an application.</p><p>Let’s define an enum:</p><pre>enum OnboardingVariant {<br>  control,<br>  short;<br><br>  int get stepCount =&gt; switch (this) {<br>    OnboardingVariant.control =&gt; 5,<br>    OnboardingVariant.short =&gt; 3,<br>  };<br>  static OnboardingVariant fromString(<br>    String value,<br>  ) {<br>    return switch (value) {<br>      &#39;short&#39; =&gt; OnboardingVariant.short,<br>      _ =&gt; OnboardingVariant.control,<br>    };<br>  }<br>}</pre><p>We now have type-safe variants and centralized configuration parsing.</p><p>Unknown values fall back to the existing onboarding implementation.</p><p>We also expose stepCount, allowing the feature layer to validate progression without hardcoding step counts throughout the application.</p><p>Next, define a decision model:</p><pre>class ExperimentDecision {<br>  const ExperimentDecision({<br>    required this.variant,<br>    required this.configurationActivated,<br>  });<br>  final OnboardingVariant variant;<br>  final bool configurationActivated;<br>}</pre><p>The boolean represents whether our configuration-loading procedure successfully activated configuration.</p><p><strong>It does not mean that Firebase confirmed experiment enrollment.</strong></p><p>That’s an important distinction.</p><p>Firebase manages experiment eligibility, assignment, and measurement internally. Our application can know which value it is using without necessarily knowing whether that value came from an active experiment assignment.</p><h3>5. Managing Remote Config Safely</h3><p>Remote Config initialization is one of the more subtle parts of implementing A/B testing correctly.</p><p>Firebase provides several loading strategies, including fetching and activating immediately, loading behind a screen, and fetching values for the next application session.</p><p>For an onboarding experiment, we want the variant available before displaying the experimental experience.</p><p>We’ll use a bounded loading-screen approach.</p><p>First, define our repository contract.</p><pre>abstract interface class ExperimentRepository {<br>  Future&lt;ExperimentDecision&gt;<br>      resolveOnboarding();<br>}</pre><p>Now the Firebase implementation:</p><pre>class FirebaseExperimentRepository<br>    implements ExperimentRepository {<br>  FirebaseExperimentRepository(<br>    this._remoteConfig,<br>  );</pre><pre>final FirebaseRemoteConfig _remoteConfig;</pre><pre>static const _key = &#39;onboarding_variant&#39;;</pre><pre>Future&lt;ExperimentDecision&gt;? _pending;</pre><pre>Future&lt;void&gt; initialize() async {<br>    await _remoteConfig.setDefaults({<br>      _key: &#39;control&#39;,<br>    });</pre><pre>await _remoteConfig.setConfigSettings(<br>      RemoteConfigSettings(<br>        fetchTimeout:<br>            const Duration(seconds: 3),<br>        minimumFetchInterval:<br>            const Duration(hours: 12),<br>      ),<br>    );</pre><pre>await _remoteConfig.ensureInitialized();<br>  }</pre><pre>@override<br>  Future&lt;ExperimentDecision&gt;<br>      resolveOnboarding() {<br>    return _pending ??= _resolve();<br>  }</pre><pre>Future&lt;ExperimentDecision&gt; _resolve() async {<br>    try {<br>      await _remoteConfig.fetch().timeout(<br>        const Duration(seconds: 3),<br>      );</pre><pre>await _remoteConfig.activate();</pre><pre>return ExperimentDecision(<br>        variant: OnboardingVariant.fromString(<br>          _remoteConfig.getString(_key),<br>        ),<br>        configurationActivated: true,<br>      );<br>    } catch (_) {<br>      return const ExperimentDecision(<br>        variant: OnboardingVariant.control,<br>        configurationActivated: false,<br>      );<br>    }<br>  }<br>}</pre><p>There are several deliberate choices here.</p><h3>Fetching and activation are separate</h3><p>We’re calling fetch() followed by activate().</p><p>This gives us explicit control over when newly fetched values become available to the application.</p><p>If fetching times out, we don’t initiate activation from that failed resolution path.</p><p>A timeout doesn’t cancel the underlying Firebase fetch. It may still finish and update the fetched configuration cache.</p><p>But it won’t automatically activate those values.</p><p>This is particularly useful when we need to prevent visible configuration changes halfway through a user flow.</p><h3>We cache the resolution Future</h3><p>The _pending field ensures multiple callers of this repository instance share the same resolution operation.</p><p>We’re deliberately treating the onboarding assignment as a one-time session decision.</p><p>For experiments requiring another resolution later, the repository would need an explicit lifecycle or refresh policy.</p><h3>One owner must control activation</h3><p>The example assumes this repository is the designated Remote Config activation owner for the relevant application lifecycle.</p><p>If multiple features independently invoke activate() or fetchAndActivate(), they may interfere with each other&#39;s configuration timing.</p><p>In a larger application, I’d move activation ownership into one shared Remote Config coordinator.</p><p>That coordinator should serialize activation, manage fetched values, and expose immutable feature-level decisions.</p><p>It’s generally better to coordinate Remote Config once than to let every feature implement its own competing activation strategy.</p><h3>About the loading deadline</h3><p>The three-second fetch timeout is an illustrative product decision, not a universal recommendation.</p><p>It doesn’t guarantee a three-second deadline for the entire resolution process, because activation is another asynchronous operation.</p><p>For a strict loading budget, the full resolution process should have a deadline and a cancellation or abandonment policy designed around the underlying SDK’s behavior.</p><p>The important part is that <strong>a failed or abandoned resolution must not activate a late configuration and change an experience already shown to the user</strong>.</p><p>For our example, we’ll resolve the value before onboarding becomes visible and snapshot it for the entire flow.</p><h3>6. Dependency Injection</h3><p>We’ll use get_it for dependency injection.</p><pre>final getIt = GetIt.instance;<br><br>Future&lt;void&gt; configureDependencies() async {<br>  final experiments =<br>      FirebaseExperimentRepository(<br>    FirebaseRemoteConfig.instance,<br>  );<br>  await experiments.initialize();<br>  getIt.registerSingleton&lt;<br>      ExperimentRepository&gt;(<br>    experiments,<br>  );<br>  getIt.registerLazySingleton&lt;<br>      OnboardingAnalytics&gt;(<br>    () =&gt; FirebaseOnboardingAnalytics(<br>      FirebaseAnalytics.instance,<br>    ),<br>  );<br>}</pre><p>Our existing application architecture would also register an OnboardingRepository implementation for persistence.</p><p>For example, it could use Dio with the application’s existing authentication interceptors, error mapping, and networking configuration.</p><p>The important design choice is that neither our Cubit nor our widgets know where experiment values originate.</p><p>They only depend on application-level interfaces.</p><h3>7. Modeling the Onboarding Lifecycle With Cubit</h3><p>Now we’ll integrate the experiment into our state-management layer.</p><p>Instead of using an ExperimentCubit that simply wraps a string, we&#39;ll make the experiment decision part of a meaningful onboarding lifecycle.</p><p>First, define our states.</p><pre>sealed class OnboardingState {<br>  const OnboardingState();<br>}<br><br>final class OnboardingLoading<br>    extends OnboardingState {<br>  const OnboardingLoading();<br>}<br>final class OnboardingReady<br>    extends OnboardingState {<br>  const OnboardingReady({<br>    required this.variant,<br>    this.currentStep = 0,<br>    this.isSubmitting = false,<br>    this.errorMessage,<br>  });<br>  final OnboardingVariant variant;<br>  final int currentStep;<br>  final bool isSubmitting;<br>  final String? errorMessage;<br>  bool get isLastStep =&gt;<br>      currentStep == variant.stepCount - 1;<br>  OnboardingReady copyWith({<br>    int? currentStep,<br>    bool? isSubmitting,<br>    String? errorMessage,<br>    bool clearError = false,<br>  }) {<br>    return OnboardingReady(<br>      variant: variant,<br>      currentStep:<br>          currentStep ?? this.currentStep,<br>      isSubmitting:<br>          isSubmitting ?? this.isSubmitting,<br>      errorMessage: clearError<br>          ? null<br>          : errorMessage ?? this.errorMessage,<br>    );<br>  }<br>}<br>final class OnboardingFinished<br>    extends OnboardingState {<br>  const OnboardingFinished();<br>}</pre><p>The selected variant is immutable.</p><p>Once the onboarding experience begins, we don’t allow Remote Config updates to change it.</p><p>This prevents a user from starting the five-step flow and suddenly transitioning into the three-step version.</p><p>Now define the persistence contract.</p><pre>abstract interface class OnboardingRepository {<br>  Future&lt;void&gt; completeOnboarding();<br>}</pre><p>The actual implementation should call a backend operation that validates the onboarding requirements and persists successful completion.</p><p>The backend should ideally make repeated completion requests safe, especially when network retries are possible.</p><h3>8. Analytics Without Blocking Navigation</h3><p>Before writing the Cubit, let’s create an analytics abstraction.</p><pre>abstract interface class OnboardingAnalytics {<br>  Future&lt;void&gt; activated();<br>  Future&lt;void&gt; started();<br>  Future&lt;void&gt; stepCompleted(int step);<br>  Future&lt;void&gt; completed();<br>}</pre><p>Our Firebase implementation:</p><pre>class FirebaseOnboardingAnalytics<br>    implements OnboardingAnalytics {<br>  FirebaseOnboardingAnalytics(<br>    this._analytics,<br>  );<br><br>final FirebaseAnalytics _analytics;<br>  @override<br>  Future&lt;void&gt; activated() {<br>    return _analytics.logEvent(<br>      name: &#39;onboarding_experiment_activated&#39;,<br>    );<br>  }<br>  @override<br>  Future&lt;void&gt; started() {<br>    return _analytics.logEvent(<br>      name: &#39;onboarding_started&#39;,<br>    );<br>  }<br>  @override<br>  Future&lt;void&gt; stepCompleted(int step) {<br>    return _analytics.logEvent(<br>      name: &#39;onboarding_step_completed&#39;,<br>      parameters: {<br>        &#39;step_number&#39;: step,<br>      },<br>    );<br>  }<br>  @override<br>  Future&lt;void&gt; completed() {<br>    return _analytics.logEvent(<br>      name: &#39;onboarding_completed&#39;,<br>    );<br>  }<br>}</pre><p>For ordinary analytics events, navigation should not wait for the tracking operation.</p><p>Let’s introduce a small dispatcher that handles both synchronous and asynchronous errors.</p><pre>import &#39;dart:async&#39;;<br><br>typedef AnalyticsErrorHandler = void Function(<br>  Object error,<br>  StackTrace stackTrace,<br>);<br>class AnalyticsDispatcher {<br>  AnalyticsDispatcher(this._onError);<br>  final AnalyticsErrorHandler _onError;<br>  void dispatch(<br>    Future&lt;void&gt; Function() operation,<br>  ) {<br>    unawaited(<br>      Future.sync(operation).catchError(<br>        (Object error, StackTrace stackTrace) {<br>          _onError(error, stackTrace);<br>        },<br>      ),<br>    );<br>  }<br>}</pre><p>We pass a callback rather than an already-started Future.</p><p>That allows Future.sync() to capture errors thrown before a future is returned, as well as asynchronous failures.</p><p>The dispatcher prevents Analytics failures from blocking the feature, but it doesn’t guarantee delivery, ordering across processes, or durable deduplication.</p><p>Those requirements would need a more sophisticated tracking pipeline if the product depended on them.</p><p>For example, event attempt identifiers and persisted completion markers can help prevent duplicate business-event tracking across application restarts.</p><h3>9. Implementing the Onboarding Cubit</h3><p>Now we can bring the pieces together.</p><pre>class OnboardingCubit<br>    extends Cubit&lt;OnboardingState&gt; {<br>  OnboardingCubit({<br>    required ExperimentRepository experiments,<br>    required OnboardingRepository onboarding,<br>    required OnboardingAnalytics analytics,<br>    required AnalyticsDispatcher dispatcher,<br>  })  : _experiments = experiments,<br>        _onboarding = onboarding,<br>        _analytics = analytics,<br>        _dispatcher = dispatcher,<br>        super(const OnboardingLoading());<br><br>final ExperimentRepository _experiments;<br>  final OnboardingRepository _onboarding;<br>  final OnboardingAnalytics _analytics;<br>  final AnalyticsDispatcher _dispatcher;<br>  bool _initialized = false;<br>  Future&lt;void&gt; initialize() async {<br>    if (_initialized) return;<br>    _initialized = true;<br>    final decision =<br>        await _experiments.resolveOnboarding();<br>    if (isClosed) return;<br>    if (decision.configurationActivated) {<br>      try {<br>        await _analytics.activated();<br>      } catch (_) {<br>        // Record diagnostics without<br>        // blocking access indefinitely.<br>      }<br>    }<br>    if (isClosed) return;<br>    emit(<br>      OnboardingReady(<br>        variant: decision.variant,<br>      ),<br>    );<br>    _dispatcher.dispatch(<br>      () =&gt; _analytics.started(),<br>    );<br>  }<br>  void nextStep() {<br>    final current = state;<br>    if (current is! OnboardingReady ||<br>        current.isSubmitting ||<br>        current.isLastStep) {<br>      return;<br>    }<br>    _dispatcher.dispatch(<br>      () =&gt; _analytics.stepCompleted(<br>        current.currentStep,<br>      ),<br>    );<br>    emit(<br>      current.copyWith(<br>        currentStep: current.currentStep + 1,<br>        clearError: true,<br>      ),<br>    );<br>  }<br>  Future&lt;void&gt; complete() async {<br>    final current = state;<br>    if (current is! OnboardingReady ||<br>        current.isSubmitting ||<br>        !current.isLastStep) {<br>      return;<br>    }<br>    emit(<br>      current.copyWith(<br>        isSubmitting: true,<br>        clearError: true,<br>      ),<br>    );<br>    try {<br>      await _onboarding.completeOnboarding();<br>      if (isClosed) return;<br>      emit(const OnboardingFinished());<br>      _dispatcher.dispatch(<br>        () =&gt; _analytics.completed(),<br>      );<br>    } catch (error) {<br>      if (isClosed) return;<br>      emit(<br>        current.copyWith(<br>          isSubmitting: false,<br>          errorMessage:<br>              &#39;Unable to complete onboarding. &#39;<br>              &#39;Please try again.&#39;,<br>        ),<br>      );<br>    }<br>  }<br>}</pre><p>There are a few important improvements compared with a basic Cubit implementation.</p><h3>The variant is resolved once</h3><p>The selected variant becomes part of OnboardingReady.</p><p>Every step in the flow uses the same value.</p><p>Late Remote Config changes cannot change the current experience.</p><h3>Navigation does not wait for Analytics</h3><p>When we advance a step, the event is dispatched without awaiting it.</p><p>This keeps the user interface responsive.</p><p>Analytics failures are handled independently rather than causing onboarding navigation to fail.</p><h3>We prevent invalid progression</h3><p>The Cubit checks whether the user is already on the final step.</p><p>It doesn’t increment beyond the selected variant’s expected step count.</p><p>Similarly, complete() refuses to run before the final step.</p><p>This is a useful structural guard, but it isn’t full business validation.</p><p>A production application should also validate required fields, user choices, and any variant-specific onboarding requirements. The backend remains the authority for whether onboarding can actually be completed.</p><h3>Completion is persisted before we report success</h3><p>The Cubit waits for completeOnboarding().</p><p>Only after the backend operation succeeds do we transition to OnboardingFinished and dispatch the completion event.</p><p>If the backend rejects the request, the user remains in a recoverable onboarding state.</p><h3>Duplicate submissions are prevented within the Cubit</h3><p>The isSubmitting guard prevents multiple concurrent completion requests.</p><p>For stronger guarantees, the backend should also support idempotent completion behavior.</p><p>Client-side state alone cannot guarantee exactly-once processing when retries, connection failures, or app restarts are involved.</p><h3>10. Rendering the Correct Variant</h3><p>Our UI now becomes straightforward.</p><p>At the onboarding route, provide the Cubit:</p><pre>BlocProvider(<br>  create: (_) =&gt; OnboardingCubit(<br>    experiments:<br>        getIt&lt;ExperimentRepository&gt;(),<br>    onboarding:<br>        getIt&lt;OnboardingRepository&gt;(),<br>    analytics:<br>        getIt&lt;OnboardingAnalytics&gt;(),<br>    dispatcher:<br>        getIt&lt;AnalyticsDispatcher&gt;(),<br>  )..initialize(),<br>  child: const OnboardingPage(),<br>)</pre><p>Then render the appropriate experience.</p><pre>class OnboardingPage extends StatelessWidget {<br>  const OnboardingPage({super.key});<br><br>@override<br>  Widget build(BuildContext context) {<br>    return BlocBuilder&lt;<br>        OnboardingCubit,<br>        OnboardingState&gt;(<br>      builder: (context, state) {<br>        return switch (state) {<br>          OnboardingLoading() =&gt;<br>            const OnboardingLoadingView(),<br>          OnboardingReady(<br>            :final variant,<br>          ) =&gt;<br>            switch (variant) {<br>              OnboardingVariant.control =&gt;<br>                const StandardOnboarding(),<br>              OnboardingVariant.short =&gt;<br>                const ShortOnboarding(),<br>            },<br>          OnboardingFinished() =&gt;<br>            const OnboardingSuccessView(),<br>        };<br>      },<br>    );<br>  }<br>}</pre><p>For this example, StandardOnboarding and ShortOnboarding are separate feature widgets.</p><p>They can read the current onboarding state, display the active step, show validation errors, and invoke the Cubit’s progression methods.</p><p>In a real implementation, I’d usually give substantially different onboarding variants their own widget trees while reusing common form components and business logic.</p><p>The key point is that neither widget needs to access Firebase.</p><p>It only consumes the current feature state.</p><h3>11. Understanding Experiment Activation</h3><p>This is one of the most important parts of the implementation.</p><p>Firebase distinguishes between experiment assignment and activation.</p><p><strong>Assignment</strong> determines which experimental parameter values an eligible installation receives.</p><p><strong>Activation</strong> determines when a user becomes part of the experiment’s measured population, if we’ve configured an Analytics activation event.</p><p>For our experiment, we could use:</p><pre>onboarding_experiment_activated</pre><p>as the Firebase A/B Testing activation event.</p><p>We emit it after configuration has been activated but before rendering the experimental onboarding experience.</p><p>However, our application-level configuration success flag is not proof of Firebase experiment enrollment.</p><p>An installation might resolve ordinary Remote Config values without being part of the running experiment.</p><p>Firebase handles the actual experiment eligibility and attribution.</p><p>This is why we shouldn’t attempt to reproduce Firebase’s enrollment logic with a local boolean.</p><p>The local flag only helps enforce our selected application lifecycle.</p><h3>An important measurement distinction</h3><p>The activation event should not also be used as the experiment’s primary conversion metric.</p><p>For our experiment:</p><ul><li>Activation event: onboarding_experiment_activated</li><li>Primary outcome event: onboarding_completed</li></ul><p>Both must be configured and validated in Firebase.</p><p>We should also verify Analytics collection requirements, consent behavior, event availability, and experiment targeting before launching.</p><h3>12. Testing the Experiment Without Firebase</h3><p>Because everything depends on abstractions, we can test the feature without initializing Firebase.</p><p>Let’s start with a fake experiment repository.</p><pre>class FakeExperimentRepository implements ExperimentRepository {<br>  FakeExperimentRepository(this.decision);<br><br>  final ExperimentDecision decision;<br><br>  @override<br>  Future&lt;ExperimentDecision&gt; resolveOnboarding() async =&gt; decision;<br>}</pre><p>A fake onboarding repository:</p><pre>class FakeOnboardingRepository implements OnboardingRepository {<br>  bool shouldFail = false;<br>  int completionCalls = 0;<br><br>  @override<br>  Future&lt;void&gt; completeOnboarding() async {<br>    completionCalls++;<br>    if (shouldFail) {<br>      throw Exception(&#39;Completion failed&#39;);<br>    }<br>  }<br>}</pre><p>And a recording analytics fake:</p><pre>class FakeOnboardingAnalytics<br>    implements OnboardingAnalytics {<br>  final events = &lt;String&gt;[];<br>  @override<br>  Future&lt;void&gt; activated() async {<br>    events.add(&#39;activated&#39;);<br>  }<br>  @override<br>  Future&lt;void&gt; started() async {<br>    events.add(&#39;started&#39;);<br>  }<br>  @override<br>  Future&lt;void&gt; stepCompleted(int step) async {<br>    events.add(&#39;step_$step&#39;);<br>  }<br>  @override<br>  Future&lt;void&gt; completed() async {<br>    events.add(&#39;completed&#39;);<br>  }<br>}</pre><p>We can now test variant selection.</p><pre>test(&#39;loads treatment variant&#39;, () async {<br>  final analytics = FakeOnboardingAnalytics();<br>  final cubit = OnboardingCubit(<br>    experiments: FakeExperimentRepository(<br>      const ExperimentDecision(<br>        variant: OnboardingVariant.short,<br>        configurationActivated: true,<br>      ),<br>    ),<br>    onboarding: FakeOnboardingRepository(),<br>    analytics: analytics,<br>    dispatcher: AnalyticsDispatcher(<br>      (error, stackTrace) {},<br>    ),<br>  );<br>  await cubit.initialize();<br>  final state = cubit.state as OnboardingReady;<br>  expect(<br>    state.variant,<br>    OnboardingVariant.short,<br>  );<br>  expect(<br>    analytics.events,<br>    contains(&#39;activated&#39;),<br>  );<br>  await cubit.close();<br>});</pre><p>Let’s also verify that onboarding cannot complete prematurely.</p><pre>test(<br>  &#39;prevents premature completion&#39;,<br>  () async {<br>    final onboarding =<br>        FakeOnboardingRepository();<br>  final cubit = OnboardingCubit(<br>      experiments: FakeExperimentRepository(<br>        const ExperimentDecision(<br>          variant: OnboardingVariant.short,<br>          configurationActivated: false,<br>        ),<br>      ),<br>      onboarding: onboarding,<br>      analytics: FakeOnboardingAnalytics(),<br>      dispatcher: AnalyticsDispatcher(<br>        (error, stackTrace) {},<br>      ),<br>    );<br>    await cubit.initialize();<br>    // We&#39;re still at step zero.<br>    await cubit.complete();<br>    expect(<br>      onboarding.completionCalls,<br>      0,<br>    );<br>    expect(<br>      cubit.state,<br>      isA&lt;OnboardingReady&gt;(),<br>    );<br>    await cubit.close();<br>  },<br>);</pre><p>For a complete test suite, I’d also cover:</p><ul><li>Failed and delayed Remote Config requests.</li><li>Unexpected configuration values.</li><li>Variant stability during an active flow.</li><li>Both variants reaching valid completion.</li><li>Backend validation failures.</li><li>Duplicate submission attempts.</li><li>Analytics failures and delayed operations.</li><li>Cubit disposal during an asynchronous operation.</li><li>Widget rendering and navigation for each variant.</li></ul><p>I’d also add an integration test specifically for Firebase configuration activation and event instrumentation.</p><p>Unit tests can validate our feature architecture, but they cannot independently prove that Firebase correctly enrolled an installation, processed events, or attributed experiment results.</p><h3>13. Interpreting Experiment Results</h3><p>Let’s imagine our experiment finishes with the following hypothetical results:</p><p><strong>Existing Onboarding</strong></p><ul><li>Users entering onboarding: 10,000</li><li>Users completing onboarding: 6,200</li><li>Completion rate: 62%</li><li>Average completion time: 145 seconds</li><li>Seven-day retention: 38%</li></ul><p><strong>New Onboarding</strong></p><ul><li>Users entering onboarding: 10,000</li><li>Users completing onboarding: 6,700</li><li>Completion rate: 67%</li><li>Average completion time: 105 seconds</li><li>Seven-day retention: 37.5%</li></ul><h3>What Do These Results Tell Us?</h3><p>The new onboarding increased completion from 62% to 67%.</p><p>That’s a five-percentage-point increase, or approximately 8.1% relative uplift.</p><p>Completion time also improved.</p><p>At first glance, the treatment looks better.</p><p>But retention declined slightly.</p><p>Before deciding to ship the treatment, we’d need to examine uncertainty, guardrail metrics, assignment quality, and whether our observation window was appropriate.</p><p>Firebase A/B Testing reports frequentist statistical inference, including p-values and confidence intervals.</p><p>That helps evaluate whether observed differences are consistent with a genuine treatment effect rather than random variation.</p><p>However, statistical significance isn’t the same thing as practical significance.</p><p>A statistically detectable improvement might be too small to justify the added complexity.</p><p>And an apparently positive result might not be worth shipping if it negatively affects retention or other important outcomes.</p><h3>What I’d validate</h3><p>Before accepting the result, I’d review whether the experiment ran for its planned duration, whether both variants were exposed and measured correctly, and whether the observed difference meets our predefined success criteria.</p><p>I’d also look at meaningful platform differences, such as Android versus iOS, while avoiding unsupported conclusions from exploratory subgroup comparisons.</p><p>Most importantly, I’d verify that the result answers the question we originally asked.</p><p>We shouldn’t redefine success after seeing the numbers.</p><h3>14. Experiment Lifecycle and Cleanup</h3><p>One of the easiest ways to create technical debt is to leave every experiment in the codebase forever.</p><p>Experiments should have clear lifecycles.</p><p>Once the experiment has enough evidence, the team needs to decide whether to retain the control, deploy the treatment, or investigate further.</p><p>If the treatment wins and becomes the permanent implementation, the experiment-specific branches should be removed.</p><p>For example, this:</p><pre>return switch (variant) {<br>  OnboardingVariant.control =&gt;<br>    const StandardOnboarding(),<br>  OnboardingVariant.short =&gt;<br>    const ShortOnboarding(),<br>};</pre><p>Might eventually become:</p><pre>return const ShortOnboarding();</pre><p>We should also remove obsolete configuration keys, analytics events used only for the experiment, and tests covering implementations that no longer exist.</p><p>The rollout itself should still be staged and monitored.</p><p>An experiment result doesn’t eliminate the need for a safe production release strategy.</p><p>I consider cleanup part of feature delivery, not optional maintenance.</p><h3>15. When Would I Build a Custom Experimentation System?</h3><p>For many Flutter applications, Firebase A/B Testing is a practical solution.</p><p>It handles assignment, parameter delivery, and experiment analysis without requiring us to build the infrastructure ourselves.</p><p>But there are cases where I’d consider another approach.</p><p>For example, if experiments must remain consistent across Android, iOS, web, and backend services, a server-owned assignment system may be more appropriate.</p><p>Similarly, applications with complex account-level eligibility rules, cross-device consistency requirements, or server-side business experiments may need more control.</p><p>A deterministic bucketing solution could use a stable user identifier, an experiment identifier, and a consistent hashing algorithm.</p><p>But building an experimentation platform involves more than choosing a hash function.</p><p>We’d also need experiment versioning, eligibility management, exposure tracking, mutually exclusive experiments, safe rollout controls, analytics attribution, and statistical evaluation.</p><p>Unless there’s a clear requirement Firebase cannot support, I’d prefer using an established experimentation platform.</p><p>Our Flutter architecture should remain independent of that choice.</p><p>That’s one of the benefits of placing experiment decisions behind an interface.</p><h3>Final Thoughts</h3><p>A/B testing in Flutter can begin with a simple Remote Config value and a conditional widget.</p><p>But building reliable experiments involves considerably more than switching between two interfaces.</p><p>We need to think about configuration timing, assignment consistency, analytics quality, business validation, and safe failure behavior.</p><p>We also need to ensure that experimentation doesn’t make our application slower, harder to test, or more difficult to maintain.</p><p>My preferred approach is straightforward:</p><p><strong>Keep experiment infrastructure separate from Flutter widgets.</strong></p><p><strong>Represent experimental variants with strongly typed values.</strong></p><p><strong>Resolve and preserve the selected experience at a well-defined boundary.</strong></p><p><strong>Integrate experiment behavior into meaningful feature state management.</strong></p><p><strong>Track business events without blocking ordinary navigation.</strong></p><p><strong>Validate outcomes through real business operations.</strong></p><p><strong>Test both variants independently of Firebase.</strong></p><p><strong>Remove temporary experiment code after making a decision.</strong></p><p>Ultimately, experimentation connects engineering decisions with measurable product outcomes.</p><p>We can implement a feature correctly, write clean code, and deliver a polished interface.</p><p>But none of that automatically means the feature improves the product.</p><p>A/B testing gives us a structured way to find out.</p><p>And sometimes, discovering that a proposed change doesn’t improve anything is just as valuable as discovering that it does.</p><p>Because good software engineering isn’t only about building things correctly.</p><p><strong>It’s also about making sure we’re building the right things.</strong></p><h3>References</h3><ul><li><a href="https://firebase.google.com/docs/ab-testing">Firebase A/B Testing</a></li><li><a href="https://firebase.google.com/docs/ab-testing/ab-concepts">About Firebase A/B Tests</a></li><li><a href="https://firebase.google.com/docs/ab-testing/abtest-config">Create Remote Config Experiments</a></li><li><a href="https://firebase.google.com/docs/remote-config/loading">Firebase Remote Config Loading Strategies</a></li><li><a href="https://firebase.google.com/docs/remote-config/flutter/get-started">Firebase Remote Config for Flutter</a></li><li><a href="https://pub.dev/packages/flutter_bloc">Flutter BLoC</a></li><li><a href="https://firebase.google.com/docs/analytics/get-started?platform=flutter">Firebase Analytics for Flutter</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ab3e8b8dfb8f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[iPhone Duo + AI: The Foldable iPhone Is More Interesting for Software Than Hardware]]></title>
            <link>https://medium.com/@uroradulovi/iphone-duo-ai-the-foldable-iphone-is-more-interesting-for-software-than-hardware-b2c7a4c2996a?source=rss-5a11c36c56b8------2</link>
            <guid isPermaLink="false">https://medium.com/p/b2c7a4c2996a</guid>
            <category><![CDATA[mobile-app-development]]></category>
            <category><![CDATA[iphone-duo]]></category>
            <category><![CDATA[apple]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Uroš Radulović]]></dc:creator>
            <pubDate>Wed, 23 Sep 2026 08:40:22 GMT</pubDate>
            <atom:updated>2026-09-23T08:40:22.857Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zw7s1zSWdjQeBWaOR6tQVw.png" /></figure><h3>The second screen is obvious. What developers can do with intelligence, context, and adaptive interfaces is much more interesting.</h3><p>For years, foldable phones have had a fairly simple pitch:</p><p><strong>You get more screen.</strong></p><p>And while that is useful, I have never been completely convinced that folding a phone fundamentally changes what software can do.</p><p>The iPhone Duo might be different.</p><p>Not because Apple invented the foldable. It clearly didn’t.</p><p>What makes the timing interesting is that Apple is introducing its first foldable iPhone at roughly the same time that its AI platform is becoming significantly more capable and, importantly, more accessible to developers.</p><p>The combination of <strong>a changing physical interface, on-device intelligence, personal context, and app actions</strong> could create something far more interesting than an iPhone that unfolds into a small tablet.</p><p>Apple’s iPhone Duo has a 5.4-inch outer display and a 7.6-inch inner display. It runs on the A20 Pro, while iOS 27 has been adapted specifically for the new form factor.</p><p>Those specifications are interesting.</p><p>But they aren’t the part I’m most interested in.</p><p>The question I keep coming back to is:</p><blockquote><strong><em>What happens when an AI system understands what is on your screen, understands your context, can interact with applications, and suddenly has a much larger interface to work with?</em></strong></blockquote><p>That is where things start getting interesting.</p><h3>The Second Screen Shouldn’t Just Be More Screen</h3><p>The obvious way to build a foldable application is responsive design.</p><p>When the phone is closed, show the normal mobile interface.</p><p>When it opens, show more information.</p><p>Maybe a list appears on the left and details appear on the right.</p><p>Maybe a video stays on one side while comments appear on the other.</p><p>Maybe an editor sits beside a preview.</p><p>All useful.</p><p>But none of this is particularly revolutionary.</p><p>Developers have been building adaptive interfaces for tablets, desktops, foldables, and responsive websites for years.</p><p>AI introduces another possibility.</p><p>Instead of thinking:</p><p><strong>Content + More Content</strong></p><p>we could start thinking:</p><p><strong>Application + Intelligence</strong></p><p>One side could contain what the user is doing.</p><p>The other could understand it.</p><p>The second surface doesn’t necessarily need to contain another part of the application.</p><p>It could become an <strong>intelligent layer around the application</strong>.</p><p>And I think that distinction matters.</p><h3>The iPhone Is Becoming an AI Runtime</h3><p>Apple has been gradually moving AI deeper into the operating system rather than treating it as another standalone application.</p><p>With the Foundation Models framework, developers can access Apple’s models directly from Swift.</p><p>In iOS 27, that framework becomes considerably more interesting.</p><p>Apps can work with multimodal prompts, tools, dynamic model configurations and different model providers. Apple’s LanguageModel protocol also means applications are not necessarily tied to a single model.</p><p>The architectural shift is important.</p><p>For a long time, a typical intelligent mobile feature looked something like this:</p><p><strong>App → API → Backend → AI provider</strong></p><p>That model isn’t disappearing.</p><p>But now there is another option.</p><p>Intelligence can increasingly exist much closer to the application itself.</p><p>An app may decide that one task should run using an on-device model, another should use a more powerful cloud model, and another should call deterministic application tools.</p><p>To a user, all of that could still feel like one continuous experience.</p><p>From an engineering perspective, however, AI is beginning to look less like a feature and more like <strong>another layer of the application architecture</strong>.</p><p>That changes how mobile applications are designed.</p><h3>Siri Is Also Becoming Part of the Application Layer</h3><p>This is where the combination becomes even more interesting.</p><p>Apple is connecting Siri and Apple Intelligence more deeply with application capabilities through technologies such as App Intents.</p><p>Instead of an assistant only knowing how to launch an application, applications can expose their actual capabilities.</p><p>Think about actions such as:</p><p><strong>Find a transaction.</strong></p><p><strong>Create a booking.</strong></p><p><strong>Move an appointment.</strong></p><p><strong>Search messages.</strong></p><p><strong>Add a task.</strong></p><p><strong>Open a specific project.</strong></p><p>The user doesn’t necessarily need to know where a feature exists in an application’s navigation hierarchy.</p><p>They need to communicate what they want to accomplish.</p><p>The traditional interaction model has mostly looked like this:</p><p><strong>User → Interface → Application → Action</strong></p><p>AI creates the possibility of another path:</p><p><strong>User → Intent → Intelligence → Application Action</strong></p><p>The interface doesn’t disappear.</p><p>But it is no longer necessarily the only way into the software.</p><p>That becomes particularly interesting on a device such as iPhone Duo.</p><p>You can have the application visible while an intelligent system works alongside it, understands the content currently being displayed, and helps the user act on that information.</p><p>Suddenly, two surfaces are more than a multitasking feature.</p><p>They can represent two different roles.</p><p>One surface is where you work.</p><p>The other is where the system helps you understand and act.</p><h3>Imagine a Travel App</h3><p>Consider a travel application on an unfolded iPhone Duo.</p><p>Your itinerary is visible on one side.</p><p>On the other is an intelligent assistant that understands that itinerary and can work with application capabilities.</p><p>Your flight gets delayed.</p><p>Instead of opening your calendar, checking the new arrival time, finding your dinner reservation, navigating through the booking interface and manually changing it, you say:</p><blockquote><strong><em>Move my dinner later because my flight was delayed.</em></strong></blockquote><p>The interesting part isn’t generating a response.</p><p>A chatbot can already tell you that you should move your reservation.</p><p>The interesting part is when the system understands the context, identifies the relevant reservation and performs the appropriate application action.</p><p>That is a completely different type of interaction.</p><h3>Or Consider Banking</h3><p>Imagine your transaction history on one side of the device.</p><p>On the other:</p><blockquote><strong><em>Why did I spend more this month?</em></strong></blockquote><p>The AI doesn’t need to generate a generic budgeting article.</p><p>It can potentially operate over structured data that the application intentionally exposes.</p><p>It could identify categories that changed, explain unusual transactions, compare periods and let the user continue asking questions without manually navigating between charts and filters.</p><p>Then perhaps the user asks:</p><blockquote><strong><em>Show me only subscriptions I haven’t used recently.</em></strong></blockquote><p>Now we’re moving away from fixed navigation flows and toward intent-driven interaction with structured application data.</p><p>For developers, that suggests a different design philosophy.</p><p>Instead of asking only:</p><blockquote><strong><em>Which screens does my application need?</em></strong></blockquote><p>we may increasingly need to ask:</p><blockquote><strong><em>Which capabilities should my application expose to an intelligent system?</em></strong></blockquote><p>That is a much bigger architectural change than adding another screen.</p><h3>Apps Could Become Collections of Capabilities</h3><p>This may be one of the most important changes AI brings to application development.</p><p>Historically, developers have primarily thought about software through interfaces.</p><p>We create screens.</p><p>We add buttons.</p><p>We build navigation.</p><p>We define flows.</p><p>Underneath all of that, though, the application contains capabilities.</p><p>CreatePayment.</p><p>FindTransaction.</p><p>SendMessage.</p><p>BookAppointment.</p><p>GenerateReport.</p><p>SearchContent.</p><p>CreateTask.</p><p>ChangeReservation.</p><p>AI gives us another way of reaching those capabilities.</p><p>The UI remains important because visual interfaces are predictable, discoverable and often faster than conversation.</p><p>But the application can now potentially expose the same underlying capability through multiple interaction models.</p><p>A button can trigger it.</p><p>A menu can trigger it.</p><p>A Siri request can trigger it.</p><p>An AI agent can trigger it.</p><p>That means good architecture becomes even more important.</p><p>Business logic cannot be permanently welded to one screen and one button if we expect multiple intelligent interfaces to use it.</p><p>Interestingly, AI may push us toward <strong>better software architecture</strong>, not less architecture.</p><h3>This Changes What Mobile Developers Need to Think About</h3><p>There is a popular narrative that AI will make application development dramatically simpler because models can generate interfaces and write code.</p><p>Some parts of development absolutely will become faster.</p><p>But intelligent applications introduce an entirely new category of engineering problems.</p><p>Mobile developers now need to think about things such as model selection, context management, tool boundaries, structured output, privacy, permissions, deterministic actions, confirmation flows, local versus cloud inference, evaluation and failure recovery.</p><p>Then add foldable-device concerns on top of that: adaptive layouts, continuity between display states, multitasking, posture changes and different interaction patterns.</p><p>This doesn’t make mobile engineering irrelevant.</p><p>It makes the architecture more interesting.</p><p>One particularly important signal is Apple’s investment in evaluation tooling for AI features.</p><p>Traditional software is largely deterministic.</p><p>Give a function the same input and you usually expect the same output.</p><p>Generative systems don’t always behave that way.</p><p>Testing therefore has to evolve.</p><p>We still need unit tests, integration tests and UI tests.</p><p>But now we also need to evaluate whether intelligent behavior remains useful and reliable across many possible inputs and changing models.</p><p>That is a different engineering discipline.</p><p>And it is becoming part of mobile development remarkably quickly.</p><h3>The First iPhone Duo Apps Will Probably Be Predictable</h3><p>The first generation of applications will likely do exactly what we expect.</p><p>Mail on one side, message on the other.</p><p>Video plus chat.</p><p>Timeline plus details.</p><p>Editor plus preview.</p><p>Map plus information.</p><p>And that’s fine.</p><p>Those experiences make immediate use of the larger screen.</p><p>But they mostly treat iPhone Duo as a smaller iPad that folds.</p><p>I think the more interesting applications will emerge when developers stop thinking only about <strong>what should appear on the second side of the screen</strong> and start thinking about <strong>what the system should understand about the first side</strong>.</p><p>That’s a very different question.</p><h3>AI Could Be What Makes the Fold Matter</h3><p>Foldable hardware gives developers additional physical space.</p><p>AI gives software additional understanding.</p><p>Combining the two is what interests me.</p><p>Imagine an application where the primary surface remains completely deterministic and familiar, while another surface dynamically understands what you’re doing, surfaces relevant information and exposes actions when they’re useful.</p><p>Not a chatbot permanently attached to every application.</p><p>Not another “Ask AI” button.</p><p>Something more contextual.</p><p>Something that understands that you’re editing a document, comparing products, reviewing transactions, planning a trip or analyzing a dashboard and adapts accordingly.</p><p>The best AI interface may eventually be one that you barely notice is an AI interface.</p><p>It simply makes the software around you more capable.</p><h3>The Most Interesting iPhone Duo Apps Probably Haven’t Been Designed Yet</h3><p>Whenever a new device category appears, the first software usually imitates what already existed.</p><p>Early smartphone applications borrowed heavily from desktop and web applications.</p><p>Early tablet applications often looked like stretched phone apps.</p><p>The same thing will probably happen with foldables.</p><p>Then developers start discovering interactions that only make sense because that hardware exists.</p><p>That is why I’m more interested in iPhone Duo as a software platform than as a piece of hardware.</p><p>The fold itself is interesting.</p><p>The larger screen is useful.</p><p>But neither automatically creates a new computing model.</p><p>AI potentially can.</p><p>If Apple successfully connects models, application capabilities, personal context and adaptive interfaces, then the important question for developers will not be:</p><blockquote><strong><em>How do I make my app fit a foldable screen?</em></strong></blockquote><p>It will be:</p><blockquote><strong><em>What should my app be capable of when the interface itself can understand what the user is trying to do?</em></strong></blockquote><p>That is a much more interesting problem.</p><p>And I suspect we’re only beginning to figure out the answer.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b2c7a4c2996a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Codex, Claude Code, and Antigravity for Flutter: From Vibe Coding to Verified Engineering]]></title>
            <link>https://medium.com/@uroradulovi/codex-claude-code-and-antigravity-for-flutter-from-vibe-coding-to-verified-engineering-d9ed2412465a?source=rss-5a11c36c56b8------2</link>
            <guid isPermaLink="false">https://medium.com/p/d9ed2412465a</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[openai-codex]]></category>
            <category><![CDATA[google-antigravity]]></category>
            <category><![CDATA[claude-code]]></category>
            <dc:creator><![CDATA[Uroš Radulović]]></dc:creator>
            <pubDate>Fri, 28 Aug 2026 15:12:36 GMT</pubDate>
            <atom:updated>2026-08-28T15:12:36.310Z</atom:updated>
            <content:encoded><![CDATA[<h3>AI agents can already navigate Flutter repositories, modify features, run tests, and inspect running apps. The real challenge is no longer generating Dart, it is building an engineering loop that makes those changes trustworthy.</h3><p>There was a period when “using AI for Flutter development” mostly meant opening a chat window and asking:</p><blockquote><em>Create a login screen in Flutter.</em></blockquote><p>A few seconds later, you had a Scaffold, a couple of text fields, a button, and probably a setState() somewhere.</p><p>Useful? Yes.</p><p>Transformative? Not really.</p><p>That model of AI-assisted development is quickly becoming outdated.</p><p>Today, tools such as <strong>Codex, Claude Code, and Antigravity</strong> can operate much closer to the level of an engineer working inside the repository.</p><p>They can inspect an unfamiliar codebase, search for implementations, follow dependencies, modify multiple files, execute commands, run tests, analyze failures, and iterate on their own work.</p><p>Flutter developers are adopting these tools quickly. In Flutter’s Q2 2026 survey of more than 3,500 respondents, Claude Code was used by 32%, Antigravity by 23%, and Codex by 17%.</p><p>Flutter itself is adapting too.</p><p>The ecosystem now includes official AI rules, reusable agent skills, agent plugins, and an experimental Dart and Flutter MCP server. Flutter’s current documentation directly covers workflows for Antigravity, Claude Code, and Codex.</p><p>So I think the discussion needs to move beyond:</p><p><strong>Which AI writes the best Dart?</strong></p><p>The more useful question is:</p><p><strong>How should we build Flutter software when AI agents become active participants in the engineering loop?</strong></p><h3>Writing Code Is No Longer the Interesting Part</h3><p>Consider a task such as:</p><pre>Add biometric authentication to the existing login flow.</pre><p>A traditional AI assistant might generate an example using local_auth.</p><p>A coding agent can potentially do something closer to this:</p><pre>Understand authentication<br>        ↓<br>Trace session ownership<br>        ↓<br>Inspect secure storage<br>        ↓<br>Check routing<br>        ↓<br>Inspect native configuration<br>        ↓<br>Plan the change<br>        ↓<br>Modify implementation<br>        ↓<br>Update tests<br>        ↓<br>Run analyzer<br>        ↓<br>Run tests<br>        ↓<br>Inspect failures<br>        ↓<br>Iterate</pre><p>That is fundamentally different from snippet generation.</p><p>The model is now making decisions inside an existing software system.</p><p>And that creates a harder problem.</p><p>An agent can generate perfectly valid Dart while making the wrong architectural decision.</p><p>The code can compile.</p><p>The tests can pass.</p><p>The application can run.</p><p>And the implementation can still make the codebase worse.</p><p>That is why the useful mental model is no longer:</p><pre>Prompt → Code</pre><p>It is closer to:</p><pre>Intent<br>   ↓<br>Context<br>   ↓<br>Agent<br>   ↓<br>Tools<br>   ↓<br>Change<br>   ↓<br>Evidence<br>   ↓<br>Review</pre><p>The quality of that loop matters more than the quality of the first generated response.</p><h3>Flutter Has an Unusual Advantage</h3><p>Flutter may be particularly well suited to coding agents.</p><p>Not because Dart is easy for a language model to generate.</p><p>Because Flutter gives agents something far more valuable:</p><p><strong>fast, structured feedback.</strong></p><p>A normal Flutter development loop already exposes a large amount of machine-readable evidence:</p><ul><li>Dart’s type system</li><li>static analysis</li><li>compiler errors</li><li>deterministic formatting</li><li>unit tests</li><li>widget tests</li><li>integration tests</li><li>runtime errors</li><li>the widget tree</li><li>hot reload</li></ul><p>That is an unusually useful environment for an agent.</p><p>And agents are increasingly able to access that environment directly.</p><p>Flutter’s experimental Dart and Flutter MCP server can expose development operations to compatible AI clients. It can help with analysis, dependency management, test execution, formatting, runtime inspection, widget-tree inspection, and other development tasks.</p><p>It can also interact with a running Flutter app — for example by taking screenshots, tapping controls, entering text, scrolling, and triggering hot reload.</p><p>The server is still experimental and its capabilities may evolve quickly, but the direction is clear.</p><p>The workflow can move from this:</p><pre>Agent writes UI<br>      ↓<br>Agent says:<br>&quot;This should fix the overflow.&quot;</pre><p>toward this:</p><pre>Agent writes UI<br>      ↓<br>Hot reload<br>      ↓<br>Inspect runtime<br>      ↓<br>Inspect widget tree<br>      ↓<br>Observe result<br>      ↓<br>Correct implementation</pre><p>That distinction matters.</p><p>We are moving from <strong>generation</strong> toward <strong>generation backed by evidence</strong>.</p><h3>The Verification Tax</h3><p>The Flutter team uses a useful term for one of the core problems with AI-generated software:</p><p><strong>the verification tax.</strong></p><p>AI can produce code very quickly.</p><p>But engineers still need to determine whether that code is:</p><ul><li>correct</li><li>idiomatic</li><li>secure</li><li>maintainable</li><li>consistent with the architecture</li><li>actually solving the right problem</li></ul><p>Generating ten times more code is not necessarily useful if reviewing that code becomes the bottleneck.</p><p>The real productivity equation is closer to:</p><pre>Useful AI Velocity<br>=<br>Generation Speed<br>×<br>Correctness<br>×<br>Verifiability</pre><p>If correctness or verifiability is poor, raw generation speed does not help much.</p><p>So the goal should not be:</p><p><strong>Make the agent generate more code.</strong></p><p>It should be:</p><p><strong>Make correct changes easier to produce and cheaper to verify.</strong></p><h3>The Model Is Only One Part of the System</h3><p>It is tempting to reduce the discussion to:</p><pre>Claude vs Codex vs Gemini</pre><p>But the model is only one layer.</p><p>A useful agentic development environment looks more like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tE9UhahDbjvxhTfFRJhIVA.png" /></figure><p>This explains why the same model can perform well in one codebase and poorly in another.</p><p>Give an agent:</p><ul><li>unclear architecture</li><li>inconsistent naming</li><li>weak tests</li><li>outdated documentation</li><li>ambiguous ownership</li><li>undocumented commands</li></ul><p>and it has to infer large parts of the system.</p><p>Give it:</p><ul><li>explicit boundaries</li><li>repeatable commands</li><li>reliable tests</li><li>documented conventions</li><li>accessible tooling</li></ul><p>and the problem becomes much more constrained.</p><p>The repository itself becomes part of the intelligence of the system.</p><h3>Rules: Stop Making the Agent Guess Your Architecture</h3><p>Imagine a Flutter application using:</p><ul><li>feature-first architecture</li><li>Cubit</li><li>repositories</li><li>DTO/domain separation</li><li>Dio</li><li>Retrofit</li><li>Freezed</li><li>get_it</li><li>go_router</li><li>Drift</li></ul><p>There are many valid ways to implement a feature.</p><p>Without project context, the agent has to guess which ones are acceptable.</p><p>Maybe it instantiates Dio() directly inside a repository.</p><p>Maybe it exposes API DTOs to presentation.</p><p>Maybe it introduces Riverpod because the new screen happens to be easier to implement that way.</p><p>Maybe it adds a global service despite the project already having a clear feature boundary.</p><p>All of those implementations might compile.</p><p>That doesn’t make them good changes.</p><p>This is where project-level instructions become valuable.</p><p>For example:</p><pre># Architecture<br><br>Use feature-first architecture.<br>Features may depend on core modules.<br>Presentation must not depend directly on API clients.<br>API DTOs must never leave the data layer.<br>Repositories expose domain models.<br># State management<br>Use Cubit for screen-level state.<br>Do not introduce another state-management library.<br>States must be immutable.<br># Networking<br>Use the registered Dio client.<br>Never instantiate Dio directly inside a feature.<br>Translate network exceptions before they leave the data layer.<br># Testing<br>Business logic requires unit tests.<br>Cubit state transitions should use bloc_test.<br>Never perform real HTTP calls from unit tests.<br># Validation<br>After changing generated models:<br>1. run code generation<br>2. run dart format<br>3. run flutter analyze<br>4. run flutter test</pre><p>The important part is what has been removed from the agent’s responsibility.</p><p>The agent no longer decides what architecture the feature should use.</p><p>That decision has already been made.</p><p>Its job is to operate <strong>within the system</strong>, not reinvent it.</p><h3>Don’t Turn AGENTS.md Into Another Codebase</h3><p>There is an opposite failure mode.</p><p>Once teams discover repository-level instructions, they start putting everything into them.</p><p>Architecture.</p><p>Business rules.</p><p>Deployment instructions.</p><p>Database documentation.</p><p>Testing conventions.</p><p>Every historical decision.</p><p>Eventually the root context file becomes enormous.</p><p>That is not ideal either.</p><p>A better pattern is:</p><pre>AGENTS.md<br>    │<br>    ├── ARCHITECTURE.md<br>    ├── docs/<br>    │    ├── authentication.md<br>    │    ├── networking.md<br>    │    ├── persistence.md<br>    │    └── testing.md<br>    │<br>    └── feature documentation</pre><p>The top-level file should act more like a <strong>map</strong> than an encyclopedia.</p><p>This pattern is increasingly visible in agent-first engineering environments: keep root instructions concise, then direct the agent toward structured documentation that contains the real detail.</p><p>The principle transfers well to Flutter:</p><p><strong>Give the agent enough information to find the truth. Don’t try to put the entire truth into every prompt.</strong></p><h3>Skills: Encode Workflows, Not Just Rules</h3><p>Rules describe what should generally remain true.</p><p>Skills describe <strong>how a specific kind of task should be performed</strong>.</p><p>That distinction matters.</p><p>Imagine repeatedly asking an agent to:</p><ul><li>add JSON serialization</li><li>create a responsive layout</li><li>fix analyzer warnings</li><li>update dependencies</li><li>write unit tests</li><li>configure routing</li></ul><p>You could explain the workflow in every prompt.</p><p>Or the workflow itself can become reusable context.</p><p>Flutter and Dart now provide official skills for tasks such as responsive layouts, declarative routing, JSON serialization, unit testing, dependency resolution, and static-analysis fixes.</p><p>Conceptually:</p><pre>Rules<br>&quot;What is true about this project?&quot;<br>Skills<br>&quot;How should this kind of task be performed?&quot;<br>Tools<br>&quot;What can you inspect or execute?&quot;</pre><p>That is much more scalable than trying to become increasingly clever at prompt writing.</p><h3>Tools Beat Guessing</h3><p>This leads to one of the principles I think will matter most:</p><p><strong>If the agent can query reality, don’t make it guess.</strong></p><p>Need to know whether a Dart API exists?</p><p>Ask the tooling.</p><p>Need the signature?</p><p>Resolve the symbol.</p><p>Need to know whether tests pass?</p><p>Run them.</p><p>Need to know whether a layout still overflows?</p><p>Inspect the running application.</p><p>Need package information?</p><p>Query current package data instead of relying entirely on model memory.</p><p>Every time a tool can replace an assumption, the agent’s operating environment becomes more reliable.</p><p>That is one of the most important differences between chat-based code generation and serious agentic engineering.</p><h3>Where Claude Code, Codex, and Antigravity Fit</h3><p>I don’t think permanent rankings are particularly useful.</p><p>Statements such as:</p><blockquote><em>Claude is best for architecture.</em></blockquote><p>or:</p><blockquote><em>Codex writes cleaner Dart.</em></blockquote><p>or:</p><blockquote><em>Antigravity is the best Flutter agent.</em></blockquote><p>are difficult to defend for long.</p><p>Models change.</p><p>Product capabilities change.</p><p>Tool integrations change.</p><p>I find it more useful to compare their <strong>interaction models</strong> and then decide which one fits a particular workflow.</p><h3>Claude Code: Investigation and Controlled Changes</h3><p>Claude Code fits naturally into a terminal-oriented repository workflow.</p><p>It can inspect projects, edit files, execute commands, connect to MCP servers, and operate with configurable permissions.</p><p>It also supports a plan-oriented permission mode where the agent can analyze without immediately changing the repository.</p><p>For unfamiliar or high-risk areas, that makes a workflow like this useful:</p><pre>Analyze the authentication system.<br>Do not modify anything yet.<br>Identify:<br>- session ownership<br>- token persistence<br>- refresh behavior<br>- router dependencies<br>- logout behavior<br>- platform-specific configuration<br>- relevant tests<br>Then propose the smallest architecture-compatible<br>approach for adding biometric authentication.</pre><p>The important line is:</p><pre>Do not modify anything yet.</pre><p>Before allowing an agent to change a subsystem, I want to know whether it understands that subsystem.</p><p>If its explanation is wrong, implementation should not start.</p><p>Claude Code also supports project-level instructions and MCP integrations, and Flutter now provides an official Flutter/Dart integration path for it.</p><h3>Codex: Bounded Engineering Tasks</h3><p>A useful way to work with Codex is to treat the request like a well-written engineering ticket.</p><p>Not:</p><pre>Improve pagination.</pre><p>But:</p><pre>Add cursor pagination to transaction history.<br>Before implementation, inspect the existing behavior.<br>Requirements:<br>- preserve the current repository abstraction<br>- keep already-loaded items if the next page fails<br>- prevent duplicate page requests<br>- preserve pull-to-refresh<br>- do not replace Cubit<br>- add tests for first-page and next-page failures<br>Validation:<br>- dart format<br>- flutter analyze<br>- flutter test<br>If these requirements conflict with the current architecture,<br>explain the conflict before changing the design.</pre><p>Notice how little of this is really “prompt engineering.”</p><p>It is requirements engineering.</p><p>The request defines:</p><ul><li>invariants</li><li>failure behavior</li><li>architectural boundaries</li><li>validation criteria</li></ul><p>Codex supports repository guidance through AGENTS.md, making conventions and project-specific commands part of the environment instead of something that has to be repeated manually.</p><p>Flutter also provides an official Codex integration path through its agent tooling.</p><h3>Antigravity: Closing the UI Feedback Loop</h3><p>Antigravity becomes particularly interesting when the task involves the running Flutter application.</p><p>Flutter integrates Antigravity with <strong>Agentic Hot Reload</strong>, where changes made in Agent mode can automatically trigger Flutter hot reload.</p><p>That creates a shorter UI iteration loop:</p><pre>Describe change<br>      ↓<br>Implement<br>      ↓<br>Hot reload<br>      ↓<br>Observe<br>      ↓<br>Adjust</pre><p>For example:</p><pre>Refactor the profile screen.<br>Constraints:<br>- preserve existing behavior<br>- use existing spacing and typography tokens<br>- support 320dp width without overflow<br>- preserve semantics<br>- do not change navigation<br>After implementation, inspect the running screen<br>and check for layout or runtime issues.</pre><p>There is an important distinction here.</p><p>Compatible agents such as Claude Code and Codex can also interact with Flutter hot reload through tooling such as MCP.</p><p>But <strong>automatic Agentic Hot Reload is specifically integrated into Antigravity’s Flutter workflow.</strong></p><p>That makes Antigravity particularly interesting for UI-heavy work where the feedback loop matters as much as the generated implementation.</p><h3>My Preferred Workflow: Understand → Plan → Implement → Verify → Review</h3><p>Regardless of the agent, I try to avoid:</p><pre>PROMPT<br>  ↓<br>GENERATE<br>  ↓<br>MERGE</pre><p>For non-trivial work, I prefer five stages.</p><h3>1. Understand</h3><p>Start read-only.</p><pre>Analyze the payments feature.<br>Explain:<br>- module boundaries<br>- state ownership<br>- repository interfaces<br>- API clients<br>- persistence<br>- navigation<br>- failure handling<br>- existing tests<br>Do not make changes.</pre><p>This is effectively a test of the agent’s mental model.</p><p>If it cannot correctly explain how the feature works, giving it more autonomy is unlikely to improve the result.</p><h3>2. Plan</h3><p>Next, make the intended change explicit.</p><pre>Create an implementation plan.<br>For each step include:<br>- affected files<br>- reason for changing them<br>- architectural impact<br>- public API changes<br>- migration risk<br>- required tests<br>Prefer the smallest compatible change.</pre><p>Plans are cheap to reject.</p><p>Thirty-file refactors are not.</p><p>This is where I want to catch proposals such as:</p><ul><li>adding another global service</li><li>bypassing an existing repository abstraction</li><li>duplicating state ownership</li><li>introducing a new pattern where an existing one already works</li></ul><h3>3. Implement in Bounded Slices</h3><p>Large requests tend to create large diffs.</p><p>Large diffs are harder to verify.</p><p>Instead of:</p><pre>Build the complete payments feature.</pre><p>I prefer:</p><pre>Implement the repository and domain changes<br>from the approved plan.<br>Do not modify presentation yet.</pre><p>Then:</p><pre>Implement the Cubit and its tests.</pre><p>Then:</p><pre>Implement the UI using the existing design system.</pre><p>These become checkpoints.</p><p>Each slice is easier to understand, test, review, and revert.</p><h3>4. Verify</h3><p>Do not ask an agent to simply <strong>write code</strong>.</p><p>Ask it to complete a <strong>verified change</strong>.</p><p>For a typical Flutter task, that might mean:</p><pre>Implementation<br>      ↓<br>Code generation<br>      ↓<br>dart format<br>      ↓<br>flutter analyze<br>      ↓<br>flutter test<br>      ↓<br>Runtime verification<br>      ↓<br>Diff inspection</pre><p>Not every task needs every step.</p><p>But verification should be part of the task definition.</p><p>And the most important distinction is this:</p><p><strong>The agent saying “this should work” is not evidence.</strong></p><p>Compiler output is evidence.</p><p>Analyzer output is evidence.</p><p>Tests are evidence.</p><p>Observed runtime behavior is evidence.</p><p>The diff is evidence.</p><h3>5. Review</h3><p>The final stage still belongs to the engineer.</p><p>The agent can prove many mechanical properties.</p><p>It cannot automatically prove that the change belongs in the architecture or that the product decision was correct.</p><p>That difference becomes clearer when we separate verification into levels.</p><h3>The Verification Ladder</h3><p>I find it useful to think about verification in six levels.</p><h3>Level 1 Syntactic correctness</h3><p>Does the code parse and compile?</p><h3>Level 2 Static correctness</h3><p>Does the analyzer accept it?</p><p>Are types and APIs being used correctly?</p><h3>Level 3 Behavioral correctness</h3><p>Do unit, widget, and integration tests cover the expected behavior?</p><h3>Level 4 Runtime correctness</h3><p>Does the application actually behave correctly on the target device?</p><h3>Level 5 Architectural correctness</h3><p>Does the change preserve the boundaries and invariants of the system?</p><h3>Level 6 Product correctness</h3><p>Did we build the right thing?</p><p>Verification is therefore not binary.</p><p>A change can pass Levels 1-4 and still fail Levels 5 or 6.</p><p>That distinction becomes more important as agents become increasingly good at satisfying the mechanical checks we give them.</p><p>A green analyzer cannot tell you that a repository boundary is wrong.</p><p>A passing widget test cannot tell you that you implemented the wrong workflow.</p><p>And even excellent test coverage cannot rescue an incorrect product requirement.</p><h3>Where Agents Give the Most Leverage</h3><p>There is a category of Flutter work where agents can already create substantial leverage:</p><ul><li>DTOs</li><li>serialization</li><li>Freezed models</li><li>repository implementations</li><li>route wiring</li><li>dependency registration</li><li>repetitive unit tests</li><li>API integrations</li><li>migrations</li><li>mechanical refactors</li><li>widget extraction</li><li>boilerplate around established architecture</li></ul><p>The common characteristic is not that these tasks are trivial.</p><p>It is that their boundaries and correctness criteria can usually be defined.</p><p>Suppose the architecture has already been decided:</p><pre>TransactionDto<br>      ↓<br>TransactionMapper<br>      ↓<br>Transaction<br>      ↓<br>TransactionRepository<br>      ↓<br>TransactionCubit<br>      ↓<br>TransactionView</pre><p>At that point, there is relatively little engineering value in manually typing every constructor, mapper, state class, and test fixture.</p><p>The bottleneck shifts from producing implementation to making and validating engineering decisions.</p><p>That is where agents become genuinely useful.</p><h3>Where I Slow the Agent Down</h3><p>Some areas deserve much more scrutiny.</p><h3>Concurrency</h3><p>Streams, cancellations, duplicate requests, asynchronous state transitions, isolates, and lifecycle interactions can produce bugs that are difficult to detect from static inspection.</p><h3>Offline-first architecture</h3><p>Once you introduce:</p><ul><li>retries</li><li>idempotency</li><li>conflict resolution</li><li>ordering</li><li>outboxes</li><li>background synchronization</li><li>stale data</li><li>partial failure</li></ul><p>you are defining a consistency model.</p><p>The agent should not invent that model as an implementation detail.</p><h3>Authentication</h3><p>Token storage, refresh behavior, biometrics, deep links, logout semantics, and multi-account handling deserve deliberate design.</p><h3>Native boundaries</h3><p>Swift.</p><p>Kotlin.</p><p>Platform channels.</p><p>Background execution.</p><p>Notification services.</p><p>CallKit.</p><p>Android services.</p><p>Platform SDK initialization.</p><p>The closer Flutter gets to the operating system, the more assumptions need to be verified against real platform behavior.</p><h3>Architecture itself</h3><p>This is probably the most subtle risk.</p><p>An agent can produce <strong>locally excellent code that globally damages the system</strong>.</p><p>And that failure often will not appear in flutter analyze.</p><h3>Context Beats Clever Prompting</h3><p>Compare two requests.</p><h3>Request A</h3><pre>Add login.</pre><h3>Request B</h3><pre>Implement email/password authentication.<br>First inspect the existing auth system.<br>Constraints:<br>- preserve feature-first architecture<br>- use AuthRepository<br>- AuthCubit continues to own auth state<br>- use the registered Dio client<br>- never persist credentials<br>- store session tokens through the existing secure-storage abstraction<br>- router redirects continue to control navigation<br>- API models must not escape the data layer<br>- add repository and Cubit tests<br>Validate with:<br>- code generation if required<br>- dart format<br>- flutter analyze<br>- flutter test<br>If these requirements conflict with the existing architecture,<br>explain the conflict before introducing another pattern.</pre><p>The second request is significantly better.</p><p>But not because it contains some magical prompt-engineering vocabulary.</p><p>It is better because it contains <strong>engineering decisions</strong>.</p><p>That distinction matters.</p><p>I don’t think the most important AI skill for senior developers will be memorizing clever prompts.</p><p>It will be describing software precisely.</p><h3>The Hidden Risk: Your Codebase Can Outrun Your Understanding</h3><p>Coding agents make velocity addictive.</p><p>A feature that previously took a day might appear in an hour.</p><p>So the workflow becomes:</p><pre>Feature<br>   ↓<br>Refactor<br>   ↓<br>Migration<br>   ↓<br>Feature<br>   ↓<br>Refactor<br>   ↓<br>Another feature</pre><p>Everything compiles.</p><p>Tests remain green.</p><p>The application runs.</p><p>But gradually something changes.</p><p><strong>The repository evolves faster than your understanding of it.</strong></p><p>Eventually the agent knows why the newest abstraction exists because it created it.</p><p>You only know that the tests passed.</p><p>At that point, the agent is no longer accelerating your engineering.</p><p>It is replacing your understanding.</p><p>I use one simple rule here:</p><p><strong>Never merge architecture you cannot explain yourself.</strong></p><p>After an agent makes a significant change, I should still be able to answer:</p><ul><li>Where does the state live?</li><li>Who owns this lifecycle?</li><li>Where does the data come from?</li><li>What happens when the request fails?</li><li>What happens after restart?</li><li>What happens offline?</li><li>What is persisted?</li><li>What happens when authentication expires?</li><li>What happens if the operation runs twice?</li><li>What happens if two operations finish out of order?</li></ul><p>If I cannot answer those questions confidently, the change needs another review.</p><h3>Optimize for Safe Delegation, Not Maximum Autonomy</h3><p>“Fully autonomous development” sounds impressive.</p><p>I am not convinced it is the right optimization target for production software.</p><p>A better question is:</p><p><strong>What is the largest unit of work I can safely delegate while still being able to verify the result?</strong></p><p>That unit changes depending on the task.</p><p>For DTO generation, it may be an entire implementation.</p><p>For a layout adjustment, implementation plus runtime verification may be reasonable.</p><p>For authentication architecture, the delegated task may initially be analysis only.</p><p>For a large migration, the agent may plan first, a human may approve the strategy, and the agent may then execute the mechanical work.</p><p>This is not very different from delegation inside an engineering team.</p><p>Different tasks deserve different levels of supervision.</p><p>Coding agents should be treated the same way.</p><h3>A Practical Comparison</h3><p>I would not permanently rank the three tools, but this is a useful way to think about their current Flutter workflows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-LCda7vcM8hXaYMmHFG3rQ.png" /></figure><p>The final row is intentionally a workflow interpretation, not a benchmark.</p><p>Those preferences may change as the tools evolve.</p><p>That is exactly why the project should not depend too heavily on one agent.</p><h3>Build an Agent-Agnostic Flutter Repository</h3><p>Flutter’s own AI direction increasingly favors open tooling and interoperability rather than tying development to a single model provider.</p><p>I think our projects should do the same.</p><p>Ideally:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*al1Bw9vbgrwTqDpdhk0P4g.png" /></figure><p>The model becomes replaceable.</p><p>Your engineering system does not.</p><p>That is a much more durable investment than optimizing the entire repository around whichever model happens to perform best this month.</p><h3>The Repository Is Becoming Part of the Prompt</h3><p>This may be the biggest change in how I think about AI-assisted development.</p><p>The chat prompt is becoming less important.</p><p>The environment around the agent is becoming more important.</p><p>Your:</p><pre>architecture<br>+<br>documentation<br>+<br>rules<br>+<br>skills<br>+<br>tooling<br>+<br>tests<br>+<br>CI</pre><p>collectively define what an agent can do safely.</p><p>And there is an interesting side effect.</p><p>Almost everything that makes a repository easier for an AI agent also makes it easier for a human engineer joining the project.</p><p>Clear naming helps both.</p><p>Explicit boundaries help both.</p><p>Good documentation helps both.</p><p>Reliable tests help both.</p><p>Repeatable commands help both.</p><p>A well-structured repository is increasingly both:</p><p><strong>developer experience</strong></p><p>and</p><p><strong>agent infrastructure.</strong></p><h3>Final Thoughts</h3><p>Codex can write Dart.</p><p>Claude Code can write Dart.</p><p>Antigravity can write Dart.</p><p>That is no longer the impressive part.</p><p>The interesting part is that coding agents can increasingly participate in the full development loop:</p><pre>UNDERSTAND<br>    ↓<br>PLAN<br>    ↓<br>IMPLEMENT<br>    ↓<br>EXECUTE<br>    ↓<br>OBSERVE<br>    ↓<br>VERIFY</pre><p>Flutter is particularly interesting in this world because so much of its development environment is already structured and machine-checkable.</p><p>The analyzer produces evidence.</p><p>Tests produce evidence.</p><p>The runtime produces evidence.</p><p>The widget tree produces evidence.</p><p>Hot reload makes that evidence available quickly.</p><p>And agent tooling increasingly allows models to participate directly in that feedback loop.</p><p>The developer’s role does not disappear.</p><p>The bottleneck shifts.</p><p>As implementation becomes cheaper to produce, architecture, constraints, failure analysis, verification, and product judgment account for a larger share of the engineering work.</p><p>When code becomes cheap to generate, <strong>judgment becomes more expensive.</strong></p><p>That is why I don’t see the future of Flutter development as autonomous vibe coding.</p><p>I see something more disciplined:</p><pre>Human defines intent and constraints.<br>              ↓<br>Agent builds a model of the system.<br>              ↓<br>Human validates the direction.<br>              ↓<br>Agent accelerates implementation.<br>              ↓<br>Tooling produces evidence.<br>              ↓<br>Human owns the final decision.</pre><p>The model matters.</p><p><strong>The engineering loop matters more.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d9ed2412465a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[PACE in the Age of AI: A Better Framework for AI-Assisted Software Development]]></title>
            <link>https://medium.com/@uroradulovi/pace-in-the-age-of-ai-a-better-framework-for-ai-assisted-software-development-098f8a4507ee?source=rss-5a11c36c56b8------2</link>
            <guid isPermaLink="false">https://medium.com/p/098f8a4507ee</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Uroš Radulović]]></dc:creator>
            <pubDate>Wed, 19 Aug 2026 15:28:24 GMT</pubDate>
            <atom:updated>2026-08-19T15:28:24.475Z</atom:updated>
            <content:encoded><![CDATA[<p>While working through Google’s Advanced Data Analytics Professional Certificate, I came across the <strong>PACE framework</strong>:</p><p><strong>Plan → Analyze → Construct → Execute</strong></p><p>PACE is presented as a way of structuring data projects, but the more I used AI tools in software development, the more familiar the framework started to feel.</p><p>In fact, I think PACE maps remarkably well to modern software engineering.</p><p>And AI makes that connection even more important.</p><p>Tools such as ChatGPT, Claude, Codex, Copilot, and other coding agents can now generate surprisingly large amounts of working code. They can create components, APIs, tests, database models, refactor existing systems, explain unfamiliar codebases, and even implement entire features.</p><p>That changes the bottleneck.</p><p>The difficult part of software development is increasingly becoming less about <strong>writing code</strong> and more about <strong>deciding what code should be written</strong>.</p><p>That is where PACE becomes interesting.</p><h3>Plan: Define the Problem Before Asking AI to Solve It</h3><p>AI coding tools are extremely sensitive to the quality of the problem definition.</p><p>Consider these two prompts:</p><blockquote><em>Build me a Flutter authentication system.</em></blockquote><p>and:</p><blockquote><em>Build a Flutter authentication feature using BLoC for state management, Dio for networking, secure storage for refresh tokens, repository abstractions between presentation and data layers, automatic token refresh, explicit loading/error/authenticated states, and unit tests around the authentication flow.</em></blockquote><p>The second prompt will usually produce a dramatically better result.</p><p>But the important difference is not the AI.</p><p>It is the <strong>planning</strong>.</p><p>Before implementation begins, an engineer needs to understand things such as:</p><ul><li>What problem are we solving?</li><li>Who is using the feature?</li><li>What are the functional requirements?</li><li>What are the non-functional requirements?</li><li>What constraints already exist in the system?</li><li>What architecture should the solution fit into?</li><li>What security requirements exist?</li><li>How will success be measured?</li></ul><p>This becomes even more important with AI because AI can implement the wrong idea <strong>very quickly</strong>.</p><p>Without planning, increased development speed can simply mean producing incorrect architecture faster.</p><h3>AI amplifies specification quality</h3><p>Traditional development naturally introduced friction.</p><p>An engineer had to think through a problem before spending hours implementing it.</p><p>AI removes much of that friction.</p><p>That is useful, but it also removes one of the mechanisms that previously forced us to think.</p><p>A poorly specified request can now produce hundreds of lines of plausible code in seconds.</p><p>The code might compile.</p><p>It might even work.</p><p>But that does not mean it belongs in the system.</p><p>The Plan stage therefore becomes one of the most important parts of AI-assisted engineering.</p><h3>Analyze: Understand the System Before Changing It</h3><p>Before modifying an existing application, an engineer normally needs to understand the system.</p><p>AI should not change that.</p><p>The Analyze stage maps naturally to activities such as:</p><ul><li>exploring the repository</li><li>understanding architecture</li><li>tracing dependencies</li><li>reading existing implementations</li><li>examining API contracts</li><li>understanding database schemas</li><li>identifying conventions</li><li>locating shared abstractions</li><li>inspecting tests</li><li>reproducing bugs</li><li>understanding historical design decisions</li></ul><p>This is especially important when using coding agents.</p><p>A common failure mode with AI-assisted programming is asking the model to implement something before it has enough context about the existing codebase.</p><p>The result is often code that is individually reasonable but architecturally inconsistent.</p><p>For example, imagine an application already has:</p><pre>Presentation<br>    ↓<br>Domain<br>    ↓<br>Repository<br>    ↓<br>Data Source</pre><p>An AI agent that does not understand the architecture might implement a new feature where the UI calls Dio directly.</p><p>The feature could technically work.</p><p>But it violates the architecture of the application.</p><p>The problem was not generation quality.</p><p>The problem was insufficient analysis.</p><h3>Context Is the New Input Data</h3><p>There is an interesting parallel here with data science.</p><p>A machine learning model depends heavily on its input data.</p><p>An AI coding agent depends heavily on its <strong>context</strong>.</p><p>That context might include:</p><ul><li>architecture documentation</li><li>repository structure</li><li>coding standards</li><li>domain terminology</li><li>API specifications</li><li>previous implementations</li><li>database schemas</li><li>tests</li><li>business rules</li><li>product requirements</li></ul><p>The better the context, the better the resulting implementation tends to be.</p><p>This means working effectively with AI is not simply about becoming better at prompting.</p><p>It is about becoming better at <strong>providing structured context</strong>.</p><p>That is a much more important skill.</p><h3>Construct: Let AI Accelerate Implementation</h3><p>Construct is where AI currently shines.</p><p>Once the problem and system are understood, AI can dramatically accelerate implementation.</p><p>It can help generate:</p><ul><li>classes</li><li>UI components</li><li>state management</li><li>networking layers</li><li>repositories</li><li>DTOs</li><li>database models</li><li>migrations</li><li>tests</li><li>documentation</li><li>refactors</li><li>repetitive glue code</li></ul><p>Consider a Flutter feature.</p><p>Once the engineer has already decided that the architecture should be:</p><pre>UI<br> ↓<br>Cubit<br> ↓<br>Repository<br> ↓<br>Remote / Local Data Source</pre><p>AI can generate much of the mechanical implementation extremely quickly.</p><p>The architectural decision remains human reasoning.</p><p>The implementation becomes increasingly automatable.</p><p>This distinction matters.</p><h3>AI Compresses the Construct Phase</h3><p>Traditionally, Construct could dominate development time.</p><p>An engineer might spend several days implementing something that took a few hours to design.</p><p>AI changes that ratio.</p><p>Something that previously looked like:</p><pre>Plan       ███<br>Analyze    ███<br>Construct  ███████████████<br>Execute    ████</pre><p>may increasingly look like:</p><pre>Plan       ███████<br>Analyze    ███████<br>Construct  ████<br>Execute    ██████</pre><p>The implementation has not become unimportant.</p><p>It has simply become cheaper.</p><p>And when one part of a process becomes cheaper, the relative importance of the surrounding stages increases.</p><p>This is one of the biggest changes AI may introduce to software engineering.</p><h3>Execute: Verify, Integrate, Ship, and Observe</h3><p>Generated code is not finished code.</p><p>That distinction is critical.</p><p>AI can produce an implementation, but engineers still need to determine whether that implementation belongs in a production system.</p><p>The Execute stage includes things such as:</p><ul><li>code review</li><li>testing</li><li>integration testing</li><li>security validation</li><li>performance testing</li><li>CI/CD</li><li>deployment</li><li>monitoring</li><li>analytics</li><li>crash reporting</li><li>user feedback</li><li>documentation</li></ul><p>This is where AI-generated assumptions meet reality.</p><p>A generated implementation may look convincing while containing subtle problems:</p><ul><li>incorrect concurrency assumptions</li><li>race conditions</li><li>missing error handling</li><li>inefficient database queries</li><li>insecure token handling</li><li>broken edge cases</li><li>unnecessary dependencies</li><li>architecture violations</li></ul><p>AI-generated code therefore requires the same engineering discipline as human-written code.</p><p>Possibly more.</p><p>Because generated code can appear correct before it has actually been understood.</p><h3>PACE Is Especially Useful for AI Agents</h3><p>The connection becomes even stronger when working with autonomous or semi-autonomous coding agents.</p><p>Instead of giving an agent a request like:</p><blockquote><em>Implement offline synchronization.</em></blockquote><p>A PACE-style workflow might look like this:</p><h3>Plan</h3><p>Define the requirements.</p><pre>Users must be able to create records while offline.<br>Changes should sync when connectivity returns.<br>Duplicate requests must not create duplicate records.<br>Conflicts need a defined resolution strategy.</pre><h3>Analyze</h3><p>Tell the agent to inspect:</p><pre>Current repository architecture<br>Local persistence layer<br>Network layer<br>Authentication system<br>Existing models<br>Existing synchronization code</pre><p>before changing anything.</p><h3>Construct</h3><p>Only then ask it to implement:</p><pre>Outbox queue<br>Sync worker<br>Retry strategy<br>Idempotency keys<br>Repository integration<br>Tests</pre><h3>Execute</h3><p>Finally:</p><pre>Run tests<br>Run static analysis<br>Verify offline scenarios<br>Check migration compatibility<br>Review generated changes<br>Test failure recovery</pre><p>This is dramatically more reliable than simply saying:</p><blockquote><em>Add offline mode.</em></blockquote><p>The difference is process.</p><h3>The Biggest AI Coding Mistake: Jumping Straight to Construct</h3><p>AI tools make one behavior extremely tempting:</p><pre>Idea<br> ↓<br>Prompt<br> ↓<br>Code</pre><p>But good engineering usually looks more like:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cz6yt1HgKxg_saUe5yh7iw.png" /><figcaption>Advanced PACE workflow</figcaption></figure><p><strong>PACE</strong> captures that difference nicely.</p><p>The <strong>biggest risk</strong> with AI development may not be that AI writes bad code.</p><p>It may be that AI makes it so <strong>easy to write</strong> code that we stop spending enough time deciding whether the code should exist.</p><h3>PACE and Prompt Engineering</h3><p>PACE also changes how I think about prompt engineering.</p><p>A lot of discussion around AI development focuses on finding the perfect prompt.</p><p>But for complex engineering work, one massive prompt is rarely the ideal solution.</p><p>A better approach is to separate reasoning into stages.</p><p>Instead of:</p><blockquote><em>Build this feature.</em></blockquote><p>Use:</p><h3>Plan</h3><blockquote><em>Help me define the requirements, constraints, and edge cases for this feature. Do not implement anything yet.</em></blockquote><h3>Analyze</h3><blockquote><em>Inspect the existing architecture and identify where this feature should integrate. Explain the relevant dependencies and existing patterns.</em></blockquote><h3>Construct</h3><blockquote><em>Based on the agreed architecture, implement the feature.</em></blockquote><h3>Execute</h3><blockquote><em>Review the implementation, identify failure cases, add tests, and verify that it matches the original requirements.</em></blockquote><p>That creates a feedback loop between the engineer and the AI.</p><p>And importantly, it keeps the engineer involved in the decisions.</p><h3>From Prompt Engineering to Context Engineering</h3><p>This is also why I think the industry will gradually talk less about <strong>prompt engineering</strong> and more about <strong>context engineering</strong>.</p><p>For simple tasks, a clever prompt can be enough.</p><p>For serious software systems, the AI needs much more.</p><p>It needs to know:</p><pre>What are we building?<br>Why are we building it?<br>How does the existing system work?<br>What constraints exist?<br>What conventions must be followed?<br>What must never be changed?<br>What does success look like?</pre><p>That is essentially PACE again.</p><p>Planning establishes intent.</p><p>Analysis establishes context.</p><p>Construction produces the solution.</p><p>Execution validates it against reality.</p><h3>AI Does Not Remove Engineering — It Moves Engineering Upstream</h3><p>One concern around AI programming is that engineers will eventually stop writing code.</p><p>Whether or not that happens, I think the more interesting shift is already visible.</p><p>Engineering effort is moving upward.</p><p>Less time may eventually be spent manually writing:</p><pre>class UserRepository {<br>  ...<br>}</pre><p>and more time may be spent deciding:</p><pre>Should this repository exist?<br><br>Where should this responsibility live?<br><br>What happens offline?<br><br>Who owns this data?<br><br>What happens when the request succeeds but the response is lost?<br><br>How should two devices resolve conflicting updates?<br><br>What happens when the schema changes?<br><br>How will we observe failures in production?</pre><p>Those are engineering questions.</p><p>AI does not eliminate them.</p><p>In many cases, it makes them more important.</p><h3>A PACE Loop for AI-Assisted Development</h3><p>I would represent modern AI-assisted development like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LnBPl5Q62noHBcI8o6IUJQ.png" /></figure><p>The important part is the final arrow.</p><p>Software development does not end when the code is generated.</p><p>Production teaches us something.</p><p>Users teach us something.</p><p>Monitoring teaches us something.</p><p>That information feeds the next planning cycle.</p><h3>Why PACE May Matter More in the AI Era</h3><p>AI dramatically increases our ability to produce software.</p><p>But increasing production capacity does not automatically increase software quality.</p><p>If anything, it increases the importance of deciding what deserves to be produced.</p><p>That is why a framework I originally encountered while studying data analytics made me think about software engineering.</p><p>PACE provides a useful reminder:</p><p><strong>Plan before generating.</strong></p><p><strong>Analyze before changing.</strong></p><p><strong>Construct with the right context.</strong></p><p><strong>Execute by verifying against reality.</strong></p><p>AI can accelerate each of these stages.</p><p>But the biggest mistake would be using AI only for the third one.</p><p>The future of software development may involve considerably less manual coding.</p><p>It will not involve less thinking.</p><p>If anything, it will require us to become much better at deciding <strong>what should be built, why it should be built, and how we know we built the right thing.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=098f8a4507ee" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mobile System Design with Flutter: Designing an Offline Social Feed]]></title>
            <link>https://medium.com/@uroradulovi/mobile-system-design-with-flutter-designing-an-offline-social-feed-cc5c89289e96?source=rss-5a11c36c56b8------2</link>
            <guid isPermaLink="false">https://medium.com/p/cc5c89289e96</guid>
            <category><![CDATA[mobile-app-development]]></category>
            <category><![CDATA[system-design-interview]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[system-design-concepts]]></category>
            <dc:creator><![CDATA[Uroš Radulović]]></dc:creator>
            <pubDate>Wed, 12 Aug 2026 18:38:51 GMT</pubDate>
            <atom:updated>2026-08-12T18:38:51.469Z</atom:updated>
            <content:encoded><![CDATA[<p><em>What happens when creating a post needs to work even when the network doesn’t?</em></p><p>A social feed looks deceptively simple.</p><p>Fetch some posts. Display them in a list. Let the user create a new post.</p><pre>GET /feed<br>POST /posts</pre><p>Done.</p><p>At least until we start asking production questions.</p><p>What happens when the user loses connectivity while posting?</p><p>What if a photo uploads successfully but creating the post fails?</p><p>What if the server creates the post, but the response never reaches the device?</p><p>What happens when two synchronization workers run at the same time?</p><p>How do we paginate thousands of posts without mixing pagination with synchronization?</p><p>And most importantly:</p><p><strong>Can the application recover from all of these situations without losing the user’s work?</strong></p><p>In this article, I’ll design an offline-capable social feed from the perspective of a Flutter client.</p><p>The focus isn’t on individual widgets. It’s on the decisions underneath them:</p><ul><li>API design</li><li>local persistence</li><li>pagination</li><li>optimistic updates</li><li>transactional outbox</li><li>idempotency</li><li>media uploads</li><li>synchronization</li><li>conflict handling</li><li>recovery from partial failures</li></ul><p>The goal is not to create one architecture that every social application should copy.</p><p>The goal is to understand <strong>why each component exists</strong>.</p><h3>1. Start With Requirements</h3><p>Before choosing BLoC, Drift, Dio, Riverpod, Retrofit, or anything else, I’d define the behavior the application actually needs.</p><p>For our example, users should be able to:</p><h3>Functional requirements</h3><ul><li>View their feed</li><li>Paginate through older posts</li><li>Refresh the feed</li><li>Create text posts</li><li>Attach multiple images</li><li>Create posts while offline</li><li>See their newly created post immediately</li><li>Retry failed operations</li><li>Continue unfinished synchronization after restarting the app</li></ul><h3>Non-functional requirements</h3><p>The application should:</p><ul><li>remain responsive with thousands of posts</li><li>avoid duplicate posts</li><li>avoid duplicate page requests</li><li>recover after crashes</li><li>tolerate unreliable networks</li><li>preserve unsent user-generated content</li><li>minimize unnecessary network traffic</li><li>maintain deterministic local state</li></ul><p>Already, our problem is much more interesting than:</p><pre>final response = await dio.get(&#39;/feed&#39;);</pre><h3>2. Define the Source of Truth</h3><p>One of the most important decisions is:</p><blockquote><em>Where does the UI get its feed from?</em></blockquote><p>A tempting approach is:</p><pre>UI<br> ↓<br>Cubit<br> ↓<br>Repository<br> ↓<br>API</pre><p>The problem appears when we introduce offline support.</p><p>Now we have:</p><pre>API data<br>Local cached data<br>Pending posts<br>Failed posts<br>Posts currently uploading</pre><p>If the UI has to manually combine all of those states, complexity spreads through the presentation layer.</p><p>Instead, I would design the local database as the state the UI observes.</p><pre>               ┌──────────────┐<br>               │  Remote API  │<br>               └──────┬───────┘<br>                      │<br>                      ▼<br>UI ◄── Cubit ◄── Repository<br>                      │<br>                      ▼<br>               ┌──────────────┐<br>               │ Local Store  │<br>               └──────────────┘</pre><p>The repository coordinates local and remote data.</p><p>The UI doesn’t need to know whether a post came from the API five seconds ago or was created offline five seconds ago.</p><p>It observes the feed.</p><p>Conceptually:</p><pre>Stream&lt;List&lt;Post&gt;&gt; watchFeed();</pre><p>A refresh doesn’t directly replace UI state.</p><p>Instead:</p><pre>API<br> ↓<br>Repository<br> ↓<br>Database transaction<br> ↓<br>Database emits new state<br> ↓<br>Cubit<br> ↓<br>UI</pre><p>This gives us a very useful property:</p><p><strong>Network responses update persisted state. Persisted state updates the UI.</strong></p><h3>3. Model More Than Just Post</h3><p>A basic API model might look like:</p><pre>class PostDto {<br>  final String id;<br>  final String authorId;<br>  final String body;<br>  final List&lt;MediaDto&gt; media;<br>  final DateTime createdAt;<br>}</pre><p>But our application needs to represent states the server doesn’t care about.</p><p>For example:</p><pre>Uploading<br>Pending synchronization<br>Synchronized<br>Failed</pre><p>So the local/domain model might contain additional information:</p><pre>enum SyncStatus {<br>  pending,<br>  syncing,<br>  synced,<br>  failed,<br>}</pre><pre>class Post {<br>  final String localId;<br>  final String? serverId;<br>  final String authorId;<br>  final String body;<br>  final List&lt;Media&gt; media;<br>  final DateTime localCreatedAt;<br>  final DateTime? serverCreatedAt;<br>  final SyncStatus syncStatus;<br>}</pre><p>Why separate localId and serverId?</p><p>Because a post needs an identity <strong>before the server knows it exists</strong>.</p><p>The application can generate:</p><pre>localId = UUID</pre><p>immediately.</p><p>That identifier can be used by:</p><ul><li>the database</li><li>the UI</li><li>media records</li><li>synchronization operations</li></ul><p>Once the server accepts the post, we associate it with the canonical server identity.</p><h3>4. Optimistic Posting</h3><p>Suppose the user taps:</p><blockquote><em>Post</em></blockquote><p>I don’t want the UI to sit behind a spinner while several network requests finish.</p><p>Instead:</p><pre>User taps Post<br>      │<br>      ▼<br>Create local post<br>      │<br>      ▼<br>Show it immediately<br>      │<br>      ▼<br>Synchronize asynchronously</pre><p>From the user’s perspective, the post appears instantly.</p><p>When synchronization completes:</p><pre>Sending...<br>   ↓<br>Posted</pre><p>If synchronization fails permanently:</p><pre>Couldn&#39;t post<br>Retry</pre><p>But inserting the post locally isn’t enough.</p><p>We also need to remember that it must eventually reach the server.</p><h3>5. The Transactional Outbox</h3><p>This is where I would introduce an <strong>outbox</strong>.</p><p>Instead of doing:</p><pre>await database.insertPost(post);<br>await api.createPost(post);</pre><p>we write two records together:</p><pre>Posts:<br>localId<br>body<br>syncStatus</pre><pre>Outbox:<br>operationId<br>operationType<br>entityId<br>attemptCount<br>nextAttemptAt</pre><p>Creating a post becomes conceptually:</p><pre>DATABASE TRANSACTION<br><br>1. INSERT post<br>2. INSERT CREATE_POST operation<br>COMMIT</pre><p>Either both operations succeed or neither does.</p><p>That distinction matters.</p><p>Imagine the app crashes immediately after storing the post.</p><p>Without an outbox:</p><pre>Post exists locally &gt; Application crashes<br>Result: No record saying it needs uploading</pre><p>The post could remain local forever.</p><p>With an outbox:</p><pre>Post exists<br>CREATE_POST operation exists<br>Application restarts<br>Sync worker finds operation<br>Upload continues</pre><p>The database has become more than a cache.</p><p>It contains <strong>unfinished user intent</strong>.</p><p>Cached server data is replaceable.</p><p>Pending user-generated work isn’t.</p><h3>6. Stable Operation IDs and Idempotency</h3><p>Now consider a nastier failure.</p><p>The client sends:</p><pre>POST /posts</pre><p>The server successfully creates:</p><pre>Post 91823</pre><p>But the connection dies before the response reaches the phone.</p><p>The client sees:</p><pre>NetworkException</pre><p>Did the operation fail?</p><p>We don’t know.</p><p>Retrying a normal POST could create:</p><pre>Post 91823<br>Post 91824</pre><p>Two identical posts.</p><p>This is why operations that may be retried should have a stable identity.</p><p>For example:</p><pre>{<br>  &quot;operationId&quot;: &quot;ad50eac4-...&quot;,<br>  &quot;body&quot;: &quot;Hello world&quot;<br>}</pre><p>The server stores or otherwise recognizes the operation ID.</p><p>The first request:</p><pre>operationId = ABC<br>        ↓<br>create Post 91823</pre><p>A retry:</p><pre>operationId = ABC<br>        ↓<br>already processed<br>        ↓<br>return Post 91823</pre><p>Now the client can safely use <strong>at-least-once delivery</strong> while the server provides duplicate protection.</p><p>This is a critical distinction:</p><blockquote><em>The retry mechanism does not guarantee exactly-once execution.</em></blockquote><p>Instead:</p><pre>Client retries + Server deduplicates = Exactly-once-like user experience</pre><h3>7. What About Double Taps?</h3><p>The UI should still prevent accidental double submission.</p><p>For example:</p><pre>Tap Post<br>   ↓<br>Composer enters submitting state<br>   ↓<br>Post button temporarily disabled</pre><p>But UI protection is only a usability feature.</p><p>It is <strong>not our correctness guarantee</strong>.</p><p>Race conditions, retries, process restarts, or multiple workers can still produce duplicate requests.</p><p>The stable operation ID is the stronger protection.</p><h3>8. Media Changes Everything</h3><p>Text posts are relatively straightforward.</p><p>Images introduce another distributed workflow.</p><p>I wouldn’t normally send several full-resolution images as one giant request containing the entire post.</p><p>Instead, I would upload media independently.</p><p>A possible API design:</p><pre>POST /media/uploads</pre><p>Response:</p><pre>{<br>  &quot;uploadId&quot;: &quot;media_123&quot;,<br>  &quot;uploadUrl&quot;: &quot;...signed upload URL...&quot;<br>}</pre><p>Then:</p><pre>PUT &lt;signed-upload-url&gt;</pre><p>Finally:</p><pre>POST /posts</pre><pre>{<br>  &quot;operationId&quot;: &quot;...&quot;,<br>  &quot;body&quot;: &quot;My post&quot;,<br>  &quot;mediaIds&quot;: [<br>    &quot;media_123&quot;,<br>    &quot;media_124&quot;<br>  ]<br>}</pre><p>The workflow becomes:</p><pre>Create local post<br>       │<br>       ▼<br>Create upload records<br>       │<br>       ▼<br>Upload image A ─────► media_123<br>Upload image B ─────► media_124<br>       │<br>       ▼<br>Create post referencing media IDs</pre><p>Each file gets its own upload state.</p><p>For example:</p><pre>enum UploadStatus {<br>  queued,<br>  uploading,<br>  uploaded,<br>  failed,<br>}</pre><p>And locally:</p><pre>MediaUpload:<br>localId<br>postLocalId<br>localFilePath<br>remoteMediaId<br>status<br>attemptCount</pre><p>This gives us independently retryable uploads.</p><p>If image 3 fails, we don’t necessarily restart images 1 and 2.</p><h3>9. Bounded Concurrency</h3><p>Suppose a user attaches ten images.</p><p>Starting every upload simultaneously isn’t always desirable.</p><p>Instead, the upload manager could permit something like:</p><pre>Upload queue</pre><pre>image1 ─────► worker<br>image2 ─────► worker<br>image3 ─────► worker<br>image4 ─────► waiting<br>image5 ─────► waiting<br>...</pre><p>The exact concurrency limit is a product and performance decision.</p><p>The important architectural idea is:</p><p><strong>Concurrency should be bounded.</strong></p><p>Otherwise a large batch of media can compete for:</p><ul><li>bandwidth</li><li>memory</li><li>sockets</li><li>battery</li><li>CPU</li></ul><p>This is especially relevant if preprocessing images before upload.</p><p>CPU-heavy work such as significant image processing should also avoid blocking Flutter’s UI isolate. Dart provides isolates specifically for moving sufficiently expensive computation away from the main isolate.</p><h3>10. The Sync Worker</h3><p>We now need something responsible for processing the outbox.</p><p>Conceptually:</p><pre>class SyncWorker {<br>  Future&lt;void&gt; run() async {<br>    final operations = await outbox.pendingOperations();</pre><pre>for (final operation in operations) {<br>      await process(operation);<br>    }<br>  }<br>}</pre><p>Real synchronization needs considerably more protection than this example, but the responsibility stays the same.</p><p>The worker:</p><pre>Read pending operation<br>        │<br>        ▼<br>Claim operation<br>        │<br>        ▼<br>     Execute<br>        │<br>   ┌────┴────┐<br>   │         │<br>success    failure<br>   │         │<br>   ▼         ▼<br>complete   classify</pre><p>Possible triggers include:</p><pre>Post created<br>Network becomes available<br>Application starts<br>Application resumes<br>Manual refresh<br>Scheduled/background opportunity</pre><p>I wouldn’t make correctness dependent on one specific trigger.</p><p>The important property is:</p><blockquote><em>Pending work remains persisted until some future synchronization opportunity processes it.</em></blockquote><h3>11. Retrying Everything Is Also Wrong</h3><p>Not every failure should be retried.</p><p>Consider:</p><pre>Socket timeout<br>503 Service Unavailable<br>Invalid post content<br>Authentication expired<br>File no longer exists</pre><p>These are different problems.</p><p>I would classify errors.</p><h3>Transient</h3><p>Likely retryable:</p><pre>network unavailable<br>timeout<br>selected server errors<br>rate limiting</pre><p>Potential strategy:</p><pre>attempt 1 → 2 seconds<br>attempt 2 → 5 seconds<br>attempt 3 → 15 seconds<br>attempt 4 → 30 seconds<br>...</pre><p>Usually with jitter.</p><h3>Recoverable through another action</h3><p>For example:</p><pre>401<br> ↓<br>refresh authentication<br> ↓<br>retry request</pre><h3>Permanent</h3><p>Examples could include:</p><pre>post violates server validation<br>media format unsupported<br>resource no longer exists</pre><p>Blindly retrying these forever doesn’t help.</p><p>Instead:</p><pre>syncStatus = failed</pre><p>and the application can expose an appropriate recovery action.</p><h3>12. Preventing Multiple Sync Workers</h3><p>Now imagine:</p><pre>Network listener starts sync<br>              +<br>App resume starts sync</pre><p>Two workers begin simultaneously.</p><p>Both query:</p><pre>SELECT pending operations</pre><p>Both find:</p><pre>CREATE_POST ABC</pre><p>Both send it.</p><p>Server idempotency still protects us, but the client should avoid doing unnecessary duplicate work.</p><p>A synchronization coordinator can coalesce multiple triggers:</p><pre>trigger ──┐<br>trigger ──┼──► SyncCoordinator ──► one active sync<br>trigger ──┘</pre><p>For additional protection, individual outbox records can be atomically claimed.</p><p>Conceptually:</p><pre>pending<br>   ↓<br>processing</pre><p>or with a lease:</p><pre>claimedUntil = DateTime</pre><p>If the worker crashes, the lease eventually expires and another worker can recover the operation.</p><p>This gives us protection at multiple levels:</p><pre>UI submission guard<br>        +<br>Sync coordination<br>        +<br>Atomic operation claiming<br>        +<br>Server idempotency</pre><p>Each solves a different failure mode.</p><h3>13. Reading the Feed</h3><p>Writing posts is only half of the design.</p><p>Our feed also needs pagination.</p><p>I would use cursor-based pagination.</p><p>For example:</p><pre>GET /feed?limit=20</pre><p>Response:</p><pre>{<br>  &quot;items&quot;: [...],<br>  &quot;nextCursor&quot;: &quot;opaque_cursor&quot;<br>}</pre><p>Then:</p><pre>GET /feed?limit=20&amp;cursor=opaque_cursor</pre><p>Why not:</p><pre>?page=4</pre><p>Because feeds change constantly.</p><p>Imagine:</p><pre>Page 1<br>A<br>B<br>C<br>D</pre><p>Before page 2 loads, several new posts are inserted.</p><p>Offset-based pagination can now skip or duplicate items depending on server ordering and implementation.</p><p>A cursor can describe the server’s continuation point instead.</p><p>On the client I would still:</p><ul><li>prevent duplicate page requests</li><li>deduplicate posts by stable ID</li><li>ignore stale responses after the query/filter changes</li><li>persist loaded posts locally</li></ul><h3>14. Pagination Is Not Synchronization</h3><p>This distinction is easy to miss.</p><p>Pagination answers:</p><blockquote><em>Give me older items.</em></blockquote><p>Synchronization answers:</p><blockquote><em>What changed since I last synchronized?</em></blockquote><p>They are different concerns.</p><p>I might therefore have:</p><pre>GET /feed?cursor=&lt;paginationCursor&gt;</pre><p>and separately:</p><pre>GET /feed/sync?cursor=&lt;deltaCursor&gt;</pre><p>The second endpoint could return:</p><pre>{<br>  &quot;updated&quot;: [...],<br>  &quot;deleted&quot;: [...],<br>  &quot;nextCursor&quot;: &quot;delta_xyz&quot;<br>}</pre><p>Now:</p><pre>Pagination cursor<br>     │<br>     └── historical traversal<br></pre><pre>Delta cursor<br>     │<br>     └── incremental synchronization</pre><p>I would not try to make one cursor solve both problems unless the backend protocol was explicitly designed for that.</p><h3>15. Pull to Refresh</h3><p>With a local source of truth, refresh becomes slightly different from the traditional model.</p><p>Instead of:</p><pre>Pull refresh<br>    ↓<br>GET API<br>    ↓<br>Replace Cubit state</pre><p>we do:</p><pre>Pull refresh<br>    ↓<br>Repository<br>    ↓<br>Fetch newest remote state<br>    ↓<br>Database transaction<br>    ↓<br>Database stream emits<br>    ↓<br>UI updates</pre><p>This also means existing content does not need to disappear behind a full-screen loading indicator.</p><p>The feed can remain visible while synchronization happens.</p><p>For example:</p><pre>Existing feed<br>+<br>small refresh indicator</pre><p>rather than:</p><pre>Existing feed disappears<br>↓<br>spinner<br>↓<br>entire feed appears again</pre><h3>16. Out-of-Order Responses</h3><p>Another subtle problem appears when requests overlap.</p><p>Imagine the user changes a filter:</p><pre>Request A: Following<br>Request B: For You</pre><p>Request B finishes first.</p><p>Then A arrives later.</p><p>If we blindly apply both responses, the UI can end up showing data for the wrong query.</p><p>One approach is a query generation:</p><pre>generation = 42</pre><p>Request A belongs to:</p><pre>generation 42</pre><p>The filter changes:</p><pre>generation = 43</pre><p>Request B belongs to 43.</p><p>When A finally returns:</p><pre>42 != current generation</pre><p>Its result isn’t appended to the active query.</p><p>The same principle applies to search, filters, account switching, and other state where earlier requests can become obsolete.</p><h3>17. What Happens When a Cursor Expires?</h3><p>Servers cannot necessarily preserve cursors forever.</p><p>Suppose the client hasn’t opened the app for months.</p><p>It sends:</p><pre>deltaCursor = xyz</pre><p>The server responds:</p><pre>CURSOR_EXPIRED</pre><p>This should be a designed recovery state, not an unexpected catastrophe.</p><p>A recovery strategy could be:</p><pre>1. Preserve unsent local operations<br>2. Discard replaceable server-backed feed state<br>3. Fetch a fresh snapshot<br>4. Store the new snapshot<br>5. Store the new synchronization cursor<br>6. Continue processing local pending operations</pre><p>The important part is step 1.</p><p>Don’t solve stale server cache by deleting the user’s unsent work.</p><p>This is why classifying local data matters.</p><h3>18. Local Time vs Server Time</h3><p>Offline posts introduce another interesting question.</p><p>What is:</p><pre>createdAt</pre><p>before we’ve contacted the server?</p><p>The device can generate:</p><pre>localCreatedAt</pre><p>for immediate optimistic ordering.</p><p>But device clocks cannot necessarily be treated as canonical.</p><p>Once the server acknowledges the post, it can return:</p><pre>serverCreatedAt</pre><p>The application then reconciles the optimistic record with the authoritative server representation.</p><p>Conceptually:</p><pre>Before sync<br>localCreatedAt = 2026-08-12T14:05:00+02:00<br>serverCreatedAt = null<br><br><br>After sync<br>localCreatedAt = 2026-08-12T14:05:00+02:00<br>serverCreatedAt = 2026-08-12T12:05:03Z</pre><p>The server timestamp becomes the canonical value for cross-device ordering.</p><p>The local timestamp was still useful: it let us create a responsive offline experience before that value existed.</p><h3>19. What if Media Uploads but Post Creation Fails?</h3><p>This is exactly the type of partial failure a system design should address.</p><p>Suppose:</p><pre>image A uploaded ✓<br>image B uploaded ✓<br>create post      ✗</pre><p>We should not necessarily upload A and B again.</p><p>Their successful remote media IDs can remain stored locally.</p><p>Then retry only:</p><pre>CREATE_POST</pre><p>But another problem exists.</p><p>What if the user abandons the post entirely?</p><p>The backend may now contain unattached media.</p><p>A production backend could handle this using temporary upload resources that expire unless eventually attached to a post.</p><p>This is a useful example of why mobile system design cannot completely ignore backend semantics.</p><p>The client and server must agree on the protocol.</p><h3>20. Failure Scenarios I Would Test Explicitly</h3><p>Before calling this design production-ready, I would test ugly transitions rather than only the happy path.</p><h3>App dies after local post creation</h3><p>Expected:</p><pre>post remains<br>outbox remains<br>sync resumes later</pre><h3>Server creates post but response is lost</h3><p>Expected:</p><pre>client retries same operation ID<br>server deduplicates<br>one post exists</pre><h3>Network dies during image 3 of 5</h3><p>Expected:</p><pre>completed uploads stay completed<br>remaining uploads retry</pre><h3>Two synchronization triggers fire simultaneously</h3><p>Expected:</p><pre>one logical operation is processed</pre><h3>Authentication expires during sync</h3><p>Expected:</p><pre>authentication recovery occurs<br>pending operation isn&#39;t lost</pre><h3>Cursor expires</h3><p>Expected:</p><pre>remote cache rebuilt<br>pending local operations preserved</pre><h3>App restarts</h3><p>Expected:</p><pre>feed available immediately from local storage<br>pending states reconstructed</pre><p>These scenarios tell us considerably more about architecture quality than whether /feed returns HTTP 200.</p><h3>21. Flutter Architecture</h3><p>Now we can map the design into a Flutter application.</p><p>For a sufficiently large application, I might use a feature-first structure:</p><pre>lib/<br>│<br>├── app/<br>│   ├── router/<br>│   └── bootstrap/<br>│<br>├── core/<br>│   ├── network/<br>│   ├── database/<br>│   ├── auth/<br>│   └── sync/<br>│<br>└── features/<br>    └── feed/<br>        ├── data/<br>        │   ├── api/<br>        │   ├── database/<br>        │   ├── dto/<br>        │   └── repository/<br>        │<br>        ├── domain/<br>        │   └── models/<br>        │<br>        └── presentation/<br>            ├── bloc/<br>            └── view/</pre><p>In a larger Melos/pub-workspace codebase, those boundaries could become packages.</p><p>The dependency direction is more important than the exact folder names.</p><p>Something like:</p><pre>FeedView<br>   │<br>   ▼<br>FeedCubit<br>   │<br>   ▼<br>FeedRepository<br>   │<br>   ├────────────► FeedApi<br>   │<br>   ├────────────► LocalDatabase<br>   │<br>   └────────────► Outbox</pre><p>Meanwhile:</p><pre>SyncCoordinator<br>       │<br>       ▼<br>    Outbox<br>       │<br>       ▼<br>Repositories / synchronization handlers<br>       │<br>       ▼<br>Remote services</pre><p>The presentation layer does not need to orchestrate HTTP retries, database reconciliation, and upload recovery.</p><p>Those are data/synchronization responsibilities.</p><h3>22. Example Feed Cubit</h3><p>The presentation layer can stay surprisingly small.</p><p>Conceptually:</p><pre>class FeedCubit extends Cubit&lt;FeedState&gt; {<br>  FeedCubit(this._repository);<br><br>final FeedRepository _repository;<br>  StreamSubscription&lt;List&lt;Post&gt;&gt;? _subscription;<br>  Future&lt;void&gt; initialize() async {<br>    _subscription = _repository.watchFeed().listen(<br>      (posts) {<br>        emit(<br>          FeedState.loaded(posts),<br>        );<br>      },<br>    );<br>    await _repository.refresh();<br>  }<br>  Future&lt;void&gt; loadMore() {<br>    return _repository.loadNextPage();<br>  }<br>  Future&lt;void&gt; refresh() {<br>    return _repository.refresh();<br>  }<br>  @override<br>  Future&lt;void&gt; close() async {<br>    await _subscription?.cancel();<br>    return super.close();<br>  }<br>}</pre><p>Notice what isn’t here:</p><pre>Dio<br>SQL<br>retry loops<br>upload URLs<br>idempotency handling<br>cursor persistence</pre><p>That’s intentional.</p><p>The Cubit’s job is to coordinate presentation state.</p><p>It shouldn’t become the synchronization engine.</p><h3>23. Creating a Post</h3><p>The presentation flow could similarly be:</p><pre>Future&lt;void&gt; createPost(<br>  CreatePostInput input,<br>) async {<br>  await postRepository.create(input);<br>}</pre><p>Inside the repository:</p><pre>Generate local post ID<br>Generate operation ID<br>Prepare media records<br><br>DATABASE TRANSACTION<br>    │<br>    ├── insert Post<br>    ├── insert MediaUpload records<br>    └── insert Outbox operation<br>COMMIT<br>Trigger synchronization</pre><p>The UI receives the new post through the same database-backed stream it already observes.</p><p>No special:</p><pre>temporaryPosts + remotePosts</pre><p>merge needs to live inside the widget.</p><h3>24. The Complete High-Level Architecture</h3><p>Putting everything together:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ALyNycEaFjOW1cYM_6ve7g.png" /></figure><p>The result is an architecture where:</p><p><strong>Reads</strong></p><pre>Remote → Database → UI</pre><p><strong>Writes</strong></p><pre>UI → Database + Outbox → Sync → Remote</pre><p>That symmetry is useful.</p><h3>25. What I Would Not Do</h3><p>There are a few approaches I would be cautious about.</p><h3>Keep pending posts only in Cubit state</h3><p>A process restart loses them.</p><h3>Retry POST requests without idempotency</h3><p>An uncertain network failure can create duplicates.</p><h3>Treat connectivity status as proof a request will succeed</h3><p>Having a network interface doesn’t guarantee that the API is reachable.</p><p>Attempt the operation and handle its result.</p><h3>Make background execution mandatory for correctness</h3><p>Persist work first.</p><p>Background execution should help synchronization happen sooner, not be the only thing preventing data loss.</p><h3>Mix pagination cursors with synchronization state without a protocol designed for it</h3><p>They answer different questions.</p><h3>Delete the entire local database during recovery</h3><p>Replaceable server cache and unsent user-generated work should not have the same lifecycle.</p><h3>Put synchronization logic inside widgets or Cubits</h3><p>The presentation layer shouldn’t need to understand distributed-system failure recovery.</p><h3>26. The Bigger Lesson</h3><p>Offline-first architecture isn’t primarily about checking:</p><pre>if (hasInternet) {<br>  ...<br>}</pre><p>It is about deciding what happens when operations become uncertain.</p><p>For every important write, I like asking:</p><ol><li><strong>What state was persisted before the request started?</strong></li><li><strong>Can the client know whether the server processed the request?</strong></li><li><strong>Can retrying create a duplicate?</strong></li><li><strong>What triggers recovery?</strong></li><li><strong>What does the user see while the outcome is uncertain?</strong></li><li><strong>Which side ultimately owns the authoritative state?</strong></li></ol><p>Those questions apply far beyond a social feed.</p><p>The same patterns appear in:</p><ul><li>banking transactions</li><li>messaging</li><li>file uploads</li><li>order creation</li><li>note-taking applications</li><li>booking systems</li><li>field-service applications</li></ul><p>Once we start designing around failure instead of only the happy path, mobile architecture becomes much more interesting.</p><p>And much more reliable.</p><h3>Conclusion</h3><p>Our original application was:</p><pre>GET /feed<br>POST /posts</pre><p>The production design became:</p><pre>Local source of truth<br>        +<br>Cursor pagination<br>        +<br>Optimistic writes<br>        +<br>Transactional outbox<br>        +<br>Stable operation IDs<br>        +<br>Server idempotency<br>        +<br>Independent media uploads<br>        +<br>Bounded concurrency<br>        +<br>Retry classification<br>        +<br>Synchronization coordination<br>        +<br>Delta synchronization<br>        +<br>Snapshot recovery</pre><p>That might look like a lot of machinery.</p><p>But every component exists because of a specific failure scenario.</p><p>That’s the important part of system design.</p><p>Don’t add complexity because an architecture diagram looks impressive.</p><p>Add it because you can explain:</p><blockquote><strong><em>What breaks if this component doesn’t exist?</em></strong></blockquote><p>For an offline social feed, that’s where the real design begins.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cc5c89289e96" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Approach a Flutter Live Coding Interview Without Overengineering It]]></title>
            <link>https://medium.com/@uroradulovi/how-to-approach-a-flutter-live-coding-interview-without-overengineering-it-bc19042fbe05?source=rss-5a11c36c56b8------2</link>
            <guid isPermaLink="false">https://medium.com/p/bc19042fbe05</guid>
            <category><![CDATA[dart]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[interview]]></category>
            <dc:creator><![CDATA[Uroš Radulović]]></dc:creator>
            <pubDate>Mon, 03 Aug 2026 19:37:23 GMT</pubDate>
            <atom:updated>2026-08-03T19:37:23.848Z</atom:updated>
            <content:encoded><![CDATA[<h3>A practical guide to reviewing broken code, explaining trade-offs, and delivering a testable Flutter solution under time pressure</h3><p>Live coding interviews can be uncomfortable even for experienced developers.</p><p>You are solving a technical problem, sharing your screen, explaining your reasoning, reacting to questions, and trying not to make basic syntax mistakes all at the same time.</p><p>After more than a decade in software and mobile development, with over five years focused on Flutter and Dart, one lesson stands out:</p><p><strong>A live coding interview is rarely only about whether the final application works.</strong></p><p>Interviewers are also evaluating:</p><ul><li>How you inspect unfamiliar code.</li><li>How you prioritize problems.</li><li>Whether you understand Flutter lifecycle rules.</li><li>How you separate responsibilities.</li><li>How you handle asynchronous state.</li><li>Whether your solution is testable.</li><li>How clearly you communicate trade-offs.</li><li>Whether you can avoid unnecessary complexity.</li></ul><p>To practice these skills, I created a small Flutter interview exercise based on a deliberately broken users-list application.</p><p>The repository contains several entry points: an intentionally broken implementation, a minimal Cubit refactor, a repository based version, and versions that explore streams and state management trade-offs.</p><p>This article explains how I would approach that exercise during a real interview.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3iz9zqd-Jt-kRuiYxmEyQA.png" /><figcaption>A practical framework for Flutter live-coding interviews</figcaption></figure><h3>The exercise</h3><p>The application has a simple requirement:</p><ol><li>Load users from an HTTP endpoint.</li><li>Show loading, error, empty, and success states.</li><li>Display the users in a list.</li><li>Allow users to be selected.</li><li>Support refreshing the data.</li></ol><p>The scope is intentionally small.</p><p>That is important because the purpose is not to demonstrate every Flutter package you know. The purpose is to demonstrate engineering judgment.</p><p>The broken implementation includes several common problems:</p><ul><li>A mutable User model.</li><li>Incorrect JSON keys.</li><li>An unsafe copyWith.</li><li>Network code directly inside a widget.</li><li>A network request triggered from build.</li><li>Loading state changes without setState.</li><li>Ignored HTTP status codes.</li><li>Raw exceptions shown or stored as UI messages.</li><li>Direct mutation of list items.</li><li>No clear separation between UI, state, and data access.</li></ul><p>An interview candidate could spend the entire session rewriting everything.</p><p>That is usually the wrong approach.</p><h3>1. Start by clarifying the goal</h3><p>Before changing code, I would ask several concise questions:</p><ul><li>Should I preserve the existing functionality?</li><li>Is selection expected to survive refreshes?</li><li>Should the solution prioritize speed or production structure?</li><li>Are external packages allowed?</li><li>Are tests expected during the session?</li><li>Should errors be shown inline or through a snackbar?</li><li>Is pagination outside the scope?</li></ul><p>These questions are not an attempt to delay coding.</p><p>They prevent incorrect assumptions and demonstrate that I think about requirements before implementation.</p><p>I would then summarize my plan:</p><blockquote><em>“I’ll first fix the correctness and lifecycle problems. Then I’ll separate the network call from the UI, introduce explicit state, and leave enough time for at least one or two meaningful tests.”</em></blockquote><p>That gives the interviewer visibility into my priorities.</p><h3>2. Run the application before refactoring it</h3><p>One of the biggest live-coding mistakes is immediately rewriting code without first confirming its behavior.</p><p>I would:</p><ol><li>Run flutter analyze.</li><li>Run the application.</li><li>Observe what happens.</li><li>Inspect the API response.</li><li>Identify compile-time and runtime problems.</li><li>Write down the most important issues.</li></ol><p>For this exercise, I would classify the findings into three groups.</p><h3>Correctness problems</h3><p>These prevent the application from behaving properly:</p><ul><li>Wrong JSON field names.</li><li>Unsafe null assertions in copyWith.</li><li>HTTP status codes are ignored.</li><li>Loading state is not rendered consistently.</li><li>The request can be triggered repeatedly from build.</li></ul><h3>Maintainability problems</h3><p>These make future changes risky:</p><ul><li>Network logic lives inside the widget.</li><li>The model is mutable.</li><li>State is spread across several widget fields.</li><li>Raw exceptions are mixed with UI-facing messages.</li></ul><h3>Testability problems</h3><p>These make isolated tests difficult:</p><ul><li>The HTTP client is created inside the implementation.</li><li>There is no repository boundary.</li><li>State changes depend directly on setState.</li><li>Network behavior cannot easily be replaced with a fake.</li></ul><p>I would explain that I am fixing correctness first, then improving structure.</p><p>A live-coding interview is not the place to perform a large architectural migration before the application works.</p><h3>3. Never perform side effects from build</h3><p>The most serious Flutter-specific issue in the broken implementation is the request being triggered from build.</p><p>Conceptually, it does this:</p><pre>if (users.isEmpty &amp;&amp; !isLoading) {<br>  loadUsers();<br>}</pre><p>The build method can run many times.</p><p>It may run because of:</p><ul><li>A parent rebuilding.</li><li>A theme change.</li><li>A media query change.</li><li>A state update.</li><li>A route transition.</li><li>A dependency changing.</li></ul><p>Calling an API from build can therefore create duplicate requests and unpredictable behavior.</p><p>The request should instead start from a controlled location.</p><p>For a StatefulWidget, that could be initState:</p><pre>@override<br>void initState() {<br>  super.initState();<br>  loadUsers();<br>}</pre><p>With Cubit, the initial request can happen when the Cubit is created:</p><pre>BlocProvider(<br>  create: (_) =&gt; UsersCubit(repository)..loadUsers(),<br>  child: const UsersView(),<br>)</pre><p>The important interview explanation is:</p><blockquote><em>“Build should describe the UI for the current state. It should not initiate uncontrolled side effects.”</em></blockquote><h3>4. Fix the model before introducing architecture</h3><p>The original model is mutable and has unsafe defaults.</p><p>A safer interview version is small and immutable:</p><pre>class User {<br>  const User({<br>    required this.id,<br>    required this.name,<br>    required this.email,<br>    this.isSelected = false,<br>  });</pre><pre>  final int id;<br>  final String name;<br>  final String email;<br>  final bool isSelected;</pre><pre>  factory User.fromJson(Map&lt;String, dynamic&gt; json) {<br>    return User(<br>      id: json[&#39;id&#39;] as int,<br>      name: json[&#39;name&#39;] as String? ?? &#39;&#39;,<br>      email: json[&#39;email&#39;] as String? ?? &#39;&#39;,<br>    );<br>  }</pre><pre>  User copyWith({<br>    int? id,<br>    String? name,<br>    String? email,<br>    bool? isSelected,<br>  }) {<br>    return User(<br>      id: id ?? this.id,<br>      name: name ?? this.name,<br>      email: email ?? this.email,<br>      isSelected: isSelected ?? this.isSelected,<br>    );<br>  }<br>}</pre><p>During the interview, I would explain the decisions:</p><ul><li>final fields prevent accidental in-place mutation.</li><li>required exposes missing data instead of silently using meaningless defaults.</li><li>copyWith allows controlled state updates.</li><li>JSON mapping matches the actual API contract.</li><li>Selection remains a local UI concern.</li></ul><p>For a production project, I might use generated models with Freezed and json_serializable.</p><p>For a short live-coding exercise, manually writing the model may be faster and easier for the interviewer to follow.</p><p>That is an important distinction:</p><p><strong>Use enough structure to make the code safe, but do not turn a 45-minute exercise into a code-generation setup session.</strong></p><h3>5. Introduce the smallest useful repository</h3><p>The broken screen knows:</p><ul><li>Which URL to call.</li><li>How HTTP works.</li><li>How JSON is decoded.</li><li>What status code means success.</li><li>How API data becomes a model.</li></ul><p>That is too much responsibility for a widget.</p><p>A minimal repository is enough:</p><pre>abstract interface class UsersRepository {<br>  Future&lt;List&lt;User&gt;&gt; fetchUsers();<br>}</pre><p>The implementation can depend on an injected HTTP client:</p><pre>class HttpUsersRepository implements UsersRepository {<br>  HttpUsersRepository({<br>    required http.Client client,<br>  }) : _client = client;</pre><pre>  final http.Client _client;</pre><pre>  @override<br>  Future&lt;List&lt;User&gt;&gt; fetchUsers() async {<br>    final response = await _client.get(<br>      Uri.parse(&#39;https://jsonplaceholder.typicode.com/users&#39;),<br>    );</pre><pre>    if (response.statusCode != 200) {<br>      throw UsersRequestException(response.statusCode);<br>    }</pre><pre>    final decoded = jsonDecode(response.body) as List&lt;dynamic&gt;;</pre><pre>    return decoded<br>        .map(<br>          (item) =&gt; User.fromJson(<br>            item as Map&lt;String, dynamic&gt;,<br>          ),<br>        )<br>        .toList(growable: false);<br>  }<br>}</pre><p>This gives us an immediate testing seam.</p><p>The Cubit can receive a fake repository without performing a real HTTP request.</p><p>The widget no longer needs to know where users come from.</p><h3>6. Do not add a stream unless the data is actually streaming</h3><p>One repository variant in the exercise exposes both:</p><ul><li>A Future&lt;List&lt;User&gt;&gt;.</li><li>A Stream&lt;List&lt;User&gt;&gt;.</li></ul><p>The Cubit subscribes to the stream, but fetchUsers also returns the same users. This can cause the Cubit to receive the same result through two paths and emit state more than once. It also raises ownership questions about whether the Cubit or the dependency-injection layer should close the shared repository and HTTP client.</p><p>For a one-time request followed by manual refresh, the stream does not provide much value.</p><p>I would use:</p><pre>Future&lt;List&lt;User&gt;&gt; fetchUsers();</pre><p>A stream becomes useful when the repository represents a continuously changing source, such as:</p><ul><li>A local database query.</li><li>A WebSocket feed.</li><li>Authentication state.</li><li>Connectivity changes.</li><li>Realtime messages.</li><li>A cache that can update independently.</li></ul><p>A strong live coding answer is not “streams are better” or “streams are bad.”</p><p>It is:</p><blockquote><em>“This use case is request response, so a Future keeps the data flow simpler. I would introduce a stream when the repository has multiple updates over time.”</em></blockquote><h3>7. Model explicit UI state</h3><p>There are two reasonable approaches for a small exercise.</p><h3>Option A: One immutable state object</h3><pre>class UsersState {<br>  const UsersState({<br>    this.isLoading = false,<br>    this.users = const [],<br>    this.errorMessage,<br>  });</pre><pre>  final bool isLoading;<br>  final List&lt;User&gt; users;<br>  final String? errorMessage;<br>}</pre><p>This is convenient when the UI can simultaneously have data and be refreshing.</p><p>For example:</p><pre>users are visible<br>+<br>refresh is in progress<br>+<br>an error may occur without removing existing data</pre><h3>Option B: Sealed states</h3><pre>sealed class UsersState {<br>  const UsersState();<br>}</pre><pre>final class UsersInitial extends UsersState {<br>  const UsersInitial();<br>}</pre><pre>final class UsersLoading extends UsersState {<br>  const UsersLoading();<br>}</pre><pre>final class UsersLoaded extends UsersState {<br>  const UsersLoaded(this.users);</pre><pre>  final List&lt;User&gt; users;<br>}</pre><pre>final class UsersEmpty extends UsersState {<br>  const UsersEmpty();<br>}</pre><pre>final class UsersFailure extends UsersState {<br>  const UsersFailure(this.message);</pre><pre>  final String message;<br>}</pre><p>Sealed states make impossible combinations harder to represent.</p><p>However, they may require additional states when supporting pull-to-refresh while preserving existing data.</p><p>During an interview, I would explain the trade-off and select one approach based on the expected behavior.</p><h3>A subtle copyWith problem</h3><p>Nullable fields create an issue in handwritten copyWith methods.</p><p>Consider:</p><pre>UsersState copyWith({<br>  bool? isLoading,<br>  List&lt;User&gt;? users,<br>  String? errorMessage,<br>})</pre><p>How do we distinguish between:</p><pre>The caller did not provide errorMessage.</pre><p>and:</p><pre>The caller explicitly wants errorMessage to become null.</pre><p>Both appear as null.</p><p>A simple implementation may accidentally clear the error on every copyWith call, or make it impossible to clear the error at all.</p><p>Solutions include:</p><ul><li>Using sealed states.</li><li>Introducing a wrapper or sentinel value.</li><li>Giving error state its own type.</li><li>Using Freezed in a production project.</li><li>Adding explicit operations such as clearError.</li></ul><p>Mentioning this during an interview demonstrates that you understand more than the happy path.</p><h3>8. Keep the Cubit focused</h3><p>A reasonable Cubit for the exercise has three responsibilities:</p><ol><li>Request users from the repository.</li><li>Emit state transitions.</li><li>Handle local selection changes.</li></ol><pre>class UsersCubit extends Cubit&lt;UsersState&gt; {<br>  UsersCubit(this._repository)<br>      : super(const UsersState());</pre><pre>  final UsersRepository _repository;</pre><pre>  Future&lt;void&gt; loadUsers() async {<br>    emit(<br>      state.copyWith(<br>        isLoading: true,<br>        clearError: true,<br>      ),<br>    );</pre><pre>    try {<br>      final users = await _repository.fetchUsers();</pre><pre>      emit(<br>        state.copyWith(<br>          isLoading: false,<br>          users: List.unmodifiable(users),<br>          clearError: true,<br>        ),<br>      );<br>    } on UsersRequestException {<br>      emit(<br>        state.copyWith(<br>          isLoading: false,<br>          errorMessage: &#39;Could not load users.&#39;,<br>        ),<br>      );<br>    } on FormatException {<br>      emit(<br>        state.copyWith(<br>          isLoading: false,<br>          errorMessage: &#39;The server returned invalid data.&#39;,<br>        ),<br>      );<br>    } catch (_) {<br>      emit(<br>        state.copyWith(<br>          isLoading: false,<br>          errorMessage: &#39;Something went wrong.&#39;,<br>        ),<br>      );<br>    }<br>  }</pre><pre>  void toggleSelection(int userId) {<br>    final users = state.users.map((user) {<br>      return user.id == userId<br>          ? user.copyWith(<br>              isSelected: !user.isSelected,<br>            )<br>          : user;<br>    }).toList(growable: false);</pre><pre>    emit(<br>      state.copyWith(<br>        users: List.unmodifiable(users),<br>      ),<br>    );<br>  }<br>}</pre><p>The Cubit should not:</p><ul><li>Parse JSON.</li><li>Construct URLs.</li><li>Know HTTP status codes.</li><li>Access BuildContext.</li><li>Display snackbars.</li><li>Create its own repository.</li><li>Mutate existing state collections.</li></ul><p>I have not used Cubit/BLoC as my primary professional state-management approach, so I would not claim that this is the only valid production architecture.</p><p>I use it in this interview exercise because it makes state transitions, dependency boundaries, and testability easy to discuss.</p><p>The engineering principles apply regardless of whether the real project uses Cubit, BLoC, Riverpod, ChangeNotifier, or another state-management solution.</p><h3>9. Render loading, failure, empty, and data separately</h3><p>A users list has at least four states:</p><pre>Loading<br>Failure<br>Empty success<br>Success with data</pre><p>An empty successful response is not an error.</p><p>The UI should not display the same message for both.</p><pre>if (state.isLoading &amp;&amp; state.users.isEmpty) {<br>  return const Center(<br>    child: CircularProgressIndicator(),<br>  );<br>}if (state.errorMessage != null &amp;&amp;<br>    state.users.isEmpty) {<br>  return ErrorView(<br>    message: state.errorMessage!,<br>    onRetry: () {<br>      context.read&lt;UsersCubit&gt;().loadUsers();<br>    },<br>  );<br>}</pre><pre>if (state.users.isEmpty) {<br>  return const EmptyUsersView();<br>}</pre><pre>return UsersList(users: state.users);</pre><p>Notice the loading condition:</p><pre>state.isLoading &amp;&amp; state.users.isEmpty</pre><p>That allows existing content to remain visible during refresh.</p><p>For refresh failures, I might keep the current list and show a snackbar rather than replacing useful data with a full-screen error.</p><p>That distinction demonstrates product thinking, not only technical implementation.</p><h3>10. Communicate while coding</h3><p>Silent coding makes it difficult for the interviewer to understand your decisions.</p><p>I would narrate at the level of intent:</p><blockquote><em>“The request is currently triggered from build, which can execute repeatedly, so I’m moving it to Cubit creation.”</em></blockquote><blockquote><em>“I’m making the model immutable because selection currently mutates objects that are already part of state.”</em></blockquote><blockquote><em>“I’m adding a repository boundary so the Cubit can be tested without real networking.”</em></blockquote><blockquote><em>“I’m not introducing Dio, Retrofit, dependency injection, and code generation here because the exercise is small. In a larger production codebase, those may be appropriate.”</em></blockquote><blockquote><em>“I’m preserving the existing list during refresh rather than replacing it with a blocking loader.”</em></blockquote><p>Avoid narrating every character:</p><blockquote><em>“Now I’m typing final. Now I’m adding a comma.”</em></blockquote><p>The interviewer needs your reasoning, not a transcription of your keyboard.</p><h3>11. Prioritize before polishing</h3><p>A reasonable 60-minute plan is:</p><h3>Minutes 0-5: Clarify</h3><ul><li>Confirm requirements.</li><li>Ask about packages and tests.</li><li>State the plan.</li></ul><h3>Minutes 5-12: Inspect</h3><ul><li>Run the application.</li><li>Run analysis.</li><li>Identify the main defects.</li></ul><h3>Minutes 12-25: Fix correctness</h3><ul><li>Correct JSON parsing.</li><li>Handle status codes.</li><li>Remove side effects from build.</li><li>Make the model immutable.</li></ul><h3>Minutes 25-40: Improve structure</h3><ul><li>Introduce the repository.</li><li>Introduce state management.</li><li>Wire dependencies explicitly.</li></ul><h3>Minutes 40-50: Complete UI states</h3><ul><li>Loading.</li><li>Error with retry.</li><li>Empty.</li><li>Data.</li><li>Refresh.</li><li>Selection.</li></ul><h3>Minutes 50-57: Add tests</h3><ul><li>Repository success or failure.</li><li>Cubit success or failure.</li><li>Selection behavior.</li></ul><h3>Minutes 57-60: Summarize</h3><ul><li>What was changed.</li><li>What remains.</li><li>What would differ in production.</li></ul><p>A working, explainable solution with two tests is usually stronger than a half-finished clean-architecture migration.</p><h3>12. Tests I would prioritize</h3><p>The example repository currently focuses mainly on comparing implementation patterns. For interview preparation, I would add a small test suite around the highest-risk behavior.</p><h3>Model tests</h3><pre>Given valid JSON<br>When User.fromJson is called<br>Then id, name, and email are mapped correctly</pre><p>Also test:</p><ul><li>Missing optional text fields.</li><li>Invalid ID type.</li><li>copyWith preserving unchanged values.</li></ul><h3>Repository tests</h3><pre>Given a 200 response with valid JSON<br>When fetchUsers is called<br>Then it returns parsed users</pre><pre>Given a non-200 response<br>When fetchUsers is called<br>Then it throws a typed request exception</pre><p>Also test malformed JSON.</p><p>The HTTP client should be injected so it can be replaced with a mock or fake.</p><h3>Cubit tests</h3><pre>Given the repository returns users<br>When loadUsers is called<br>Then loading and loaded states are emitted</pre><pre>Given the repository throws<br>When loadUsers is called<br>Then loading and failure states are emitted</pre><pre>Given one unselected user<br>When toggleSelection is called<br>Then the matching user becomes selected</pre><h3>Widget tests</h3><p>Test that the screen displays:</p><ul><li>A progress indicator while initially loading.</li><li>An error and retry action after failure.</li><li>An empty-state message for an empty response.</li><li>User names and email addresses after success.</li><li>Updated checkbox state after selection.</li></ul><p>In a short interview, I would not try to test everything.</p><p>I would choose tests that demonstrate that the architecture is testable.</p><h3>13. Avoid unnecessary interview architecture</h3><p>Experienced developers sometimes overcompensate during live coding.</p><p>They introduce:</p><ul><li>Multiple packages.</li><li>Full clean architecture.</li><li>Use cases for every method.</li><li>Generic result abstractions.</li><li>Service locators.</li><li>Code generation.</li><li>Custom design systems.</li><li>A complex navigation setup.</li><li>Streams for one HTTP request.</li></ul><p>These techniques can all be valid in the right project.</p><p>But every abstraction has a cost.</p><p>For this exercise, I would probably use:</p><pre>UI<br>↓<br>Cubit<br>↓<br>Repository<br>↓<br>HTTP client</pre><p>That is enough to show:</p><ul><li>Separation of concerns.</li><li>Dependency inversion.</li><li>Testability.</li><li>Explicit state.</li><li>Error handling.</li><li>Immutable updates.</li></ul><p>If the interviewer asks how it would scale, I can explain the next steps:</p><ul><li>Separate files by responsibility.</li><li>Introduce DTO and domain models where they meaningfully differ.</li><li>Use Dio and Retrofit for a larger API surface.</li><li>Use get_it or Injectable when dependency wiring grows.</li><li>Add typed failure mapping.</li><li>Add localization.</li><li>Add feature-level packages when the application size requires them.</li><li>Add local persistence when offline or cached behavior is required.</li></ul><p>The key is to distinguish between:</p><blockquote><em>“What this exercise needs now”</em></blockquote><p>and:</p><blockquote><em>“What a production application may need later.”</em></blockquote><h3>14. Be willing to critique your own solution</h3><p>A strong interview ending is not:</p><blockquote><em>“Done. This is perfect.”</em></blockquote><p>Instead, I would say:</p><blockquote><em>“This version solves the main correctness problems and creates testable boundaries. Given more time, I would improve the nullable </em><em>copyWith semantics, use typed domain failures, split the classes into separate files, add request cancellation or stale-request protection, and expand the tests.”</em></blockquote><p>Other improvements could include:</p><ul><li>Preventing two refresh requests from running simultaneously.</li><li>Ignoring an older request result if a newer request finishes first.</li><li>Preserving selected users after refresh.</li><li>Adding accessibility semantics.</li><li>Localizing user-facing strings.</li><li>Adding request timeouts.</li><li>Handling offline state.</li><li>Logging technical errors without exposing them to users.</li><li>Separating API DTOs from domain models.</li><li>Adding pagination for larger datasets.</li></ul><p>Recognizing limitations shows engineering maturity.</p><h3>15. What interviewers are really evaluating</h3><p>The final code matters, but the process often matters just as much.</p><p>A good candidate demonstrates:</p><h3>Correctness</h3><p>The application behaves as requested and handles realistic failures.</p><h3>Prioritization</h3><p>Critical defects are fixed before optional architecture improvements.</p><h3>Flutter knowledge</h3><p>The candidate understands lifecycle, rebuilding, immutability, state, asynchronous operations, and widget responsibilities.</p><h3>Communication</h3><p>Decisions are explained clearly without narrating every keystroke.</p><h3>Testability</h3><p>Dependencies and state transitions can be isolated.</p><h3>Trade-off awareness</h3><p>The candidate can explain why a pattern is appropriate here and when it would not be.</p><h3>Adaptability</h3><p>When the interviewer changes a requirement, the candidate adjusts without becoming defensive.</p><h3>Professional judgment</h3><p>The candidate does not hide uncertainty or pretend a rushed solution is production-complete.</p><h3>Final checklist</h3><p>Before the interview:</p><ul><li>Verify the Flutter SDK.</li><li>Verify the emulator or device.</li><li>Practice sharing the correct screen.</li><li>Know the keyboard shortcuts for refactoring and quick fixes.</li><li>Practice writing one model, repository, Cubit, and widget test from memory.</li><li>Practice explaining Future, Stream, setState, Cubit, and repository trade-offs.</li><li>Practice recovering from a syntax error without panicking.</li></ul><p>During the interview:</p><ul><li>Clarify the requirements.</li><li>Prioritize correctness.</li><li>Explain the plan.</li><li>Keep side effects out of build.</li><li>Use immutable state.</li><li>Separate networking from presentation.</li><li>Handle loading, error, empty, and data states.</li><li>Add at least one meaningful test.</li><li>Explain shortcuts and compromises.</li></ul><p>At the end:</p><ul><li>Demonstrate the working flow.</li><li>Summarize the architecture.</li><li>Mention known limitations.</li><li>Explain what you would improve in production.</li><li>Ask whether the interviewer wants to explore any trade-off more deeply.</li></ul><h3>Conclusion</h3><p>The goal of a Flutter live-coding interview is not to produce the most sophisticated architecture possible.</p><p>The goal is to demonstrate that you can take imperfect code, understand it quickly, improve it safely, and communicate your decisions.</p><p>For a small users list exercise, a simple structure is usually enough:</p><pre>Immutable model<br>+<br>Repository<br>+<br>Explicit state<br>+<br>Cubit or another state holder<br>+<br>UI for every important state<br>+<br>Focused tests</pre><p>The best solution is not the one with the most layers.</p><p>It is the one whose complexity matches the problem, whose behavior is correct, and whose trade offs you can explain confidently.</p><p><strong>Example repo:</strong> <a href="https://github.com/AllinGaming/test_interview_example">https://github.com/AllinGaming/test_interview_example</a></p><p>If you have any suggestions, feel free to contact me!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bc19042fbe05" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>