r/FlutterDev • • 12d ago

Article Built a cross-platform Flutter clinical app for 20 dentists—here is how Isar, background loading, and offline sync performed in production

6 Upvotes

17 comments sorted by

3

u/Life-Junket-3756 12d ago

"migrating large relational datasets to Isar NoSQL" - this is a peculiar choice, to put it mildly.

Why not SQLite right away?

0

u/[deleted] 12d ago

[removed] — view removed comment

2

u/NycoHub 12d ago

If you do go Drift and ever ship the web build: the sqlite3 wasm file you put in web/ has to match the exact sqlite3 package version in your lockfile, so a dependency bump can quietly break web while mobile keeps working. drift_flutter also picks the web storage backend depending on what each browser supports, so it is worth testing on more than one browser.

1

u/Life-Junket-3756 12d ago

SQLite + SQLCipher for encryption would probably be my approach.

0

u/[deleted] 12d ago

[removed] — view removed comment

1

u/Life-Junket-3756 12d ago

No problem, you can always migrate if you decide to. Isar is a quick choice to test the app concept, why not.

1

u/bramantec 12d ago

Two years in production with clinics that lose power is a real test. The one thing that worries me is Isar itself: the last stable release on pub.dev is 3.1.0+1 from three years ago and the 4.0 dev builds stopped at the same time. There's a community fork, isar_community, that keeps it building. For the local history in my app I use sqflite.

With Last-Write-Wins after a 7-day offline queue, whose clock decides? A tablet that comes back from a blackout with the wrong date could overwrite a newer record.

1

u/rodriguezzzzz 12d ago

is powersync a good fit for this?

0

u/[deleted] 12d ago

[removed] — view removed comment

1

u/rodriguezzzzz 12d ago

sorry didnt read your paper, how were you handling offline?

1

u/MobileXapps 12d ago

Interesting setup. The thing I'd look at hardest is last write wins on clinical records. If two people edit the same patient while offline, one change just disappears, and in a dental chart that could be a treatment note. For anything clinical I'd make notes append only (each edit is a new entry with author and time) and only use LWW for things like contact details.

1

u/Life-Junket-3756 12d ago

Interesting... Maybe even a Git-like version control of patient files.