All posts

Why I chose Flutter for P2F

The trade-offs behind a privacy-first fitness app, and why Flutter's local-first model was the right call.

When I started building P2F, I had two core constraints: the app had to run on both Android and iOS, and it had to work entirely offline. No accounts, no syncing to a server, no third-party analytics pinging home. Just the user and their data, on their device.

Why not React Native?

React Native was the obvious first consideration. The ecosystem is mature, JavaScript is familiar, and the community is huge. But React Native's bridge architecture (at least before the new architecture fully stabilised) introduced performance jitter on animation-heavy screens. For a fitness app where snappy transitions and smooth progress charts matter, that felt wrong.

Where Flutter helped

Flutter's compiled Dart code and its own rendering engine meant animations were smooth from day one. The widget model felt natural once you stopped fighting it: everything is a widget, composition is the answer, and hot reload made iteration fast.

The other big win was consistency. The same workout timer, the same chart animations, the same font rendering on both platforms without any platform-specific patches.

The local-first data model

The local-first decision shaped the data model significantly. I used sqflite for structured workout data and Hive for user preferences. The schema had to be designed with conflict-free offline use in mind from the start, because there's no server to resolve inconsistencies later.

This also forced a discipline around data modelling I wouldn't have had with a cloud-backed app. Every field had to earn its place; there was no "we'll filter this server-side" escape hatch.

Would I do it again?

Yes. Flutter's maturity has only improved since I started P2F. And building a product that genuinely respects user privacy is worth the constraints it imposes. Users shouldn't have to trust you with their health data just to track their workouts.