Menu

The offline-first decision I put off for a year
📰

The offline-first decision I put off for a year

DEV Community: flutter·Charlie Fisher·about 3 hours ago
#xrHQeqLB
#devtoflutter#devto#dev#offline#every
Reading 0:00
15s threshold

Charlie Fisher

For a year I told myself my Flutter app didn't need offline support. Then I spent a week in a place with terrible signal and realized how much of the app was pointless without a network.

Adding offline-first after the fact is much harder than starting with it. What I'd do differently:

  • Model every write as an operation that can be queued
  • Give every entity a local id and a server id
  • Decide the conflict rule before writing sync code

We went with "last write wins per field" and it's been fine for our use case, but I regret not writing down the rule earlier.

I'm learning Zig on the side, mostly out of curiosity about low-level memory. It's a very different world from Dart, and that's the point.