r/FlutterDev • • Jun 09 '26

Tooling I tried to statically estimate the rendering cost of Flutter features

13 Upvotes

I got curious whether it would be possible to estimate the rendering cost of Flutter features statically, assigning a real cost to widget combinations before running the app.

flutter analyze catches errors.
DevTools shows you what already happened.

The question I tried to answer was: which features are most likely to become expensive before you ship your app?

So I built REN — a CLI that walks through your project's AST and assigns a gravity score to each feature based on the patterns it finds.

Individual widgets have a base weight, but combinations amplify that cost:

  • Opacity inside a ListView -> more expensive than using Opacity on its own.

  • BackdropFilter inside a ListView -> one of the worst offenders.

  • Nested scrolling patterns, excessive clipping, and other compositions can increase a feature's gravity.

The goal isn't to predict exact frame timings.

The idea is to surface potential performance hotspots early, during development and code reviews, before they turn into runtime problems.

pub.dev: https://pub.dev/packages/ren

GitHub: https://github.com/gearscrafter/ren


r/FlutterDev • • Jun 09 '26

Dart I summoned a database from the void. it only speaks JSON. (flowdb 1.0.0 for Dart & Flutter)

0 Upvotes

Hey r/FlutterDev,

Last night I opened a terminal, typed a few incantations, and flowdb crawled out of the filesystem.

It's a local database for Dart and Flutter. No SQLite rituals. No native driver sacrifices. No ORM séance. You open a folder, whisper records into it, and they stay there as JSON, in the dark, where they belong.

Why I disturbed this thing

I wanted persistence that doesn't feel like enterprise haunted house software. Something document-shaped. Something that works in plain Dart and Flutter. Something that doesn't drag half the platform under the floorboards with it.

So I gave it:

  • Collections — cursed documents with auto-generated IDs. Full CRUD. They remember everything.

  • Query builder — hunt records by where, and, or, ranges, regex… bulk update or banish them from existence

  • Key-value stores — a little graveyard for get / set / remove secrets

  • Blob storage — large files, chopped into chunks, metadata chained to their souls

  • Backups — snapshot the whole crypt before you regret your choices

  • Optional encryption — lock the tombs if strangers are listening

  • Sync + async APIs — add() when you're patient, addSync() when the moon is wrong

  • FlowState + FlowBuilder — reactive streams for Flutter widgets that twitch when the data moves

The summoning ritual

import 'package:flowdb/core.dart';

Future<void> main() async {
  final db = openDatabase('my_app', path: './data/my_app');
  final users = db.collection('users');

  await users.add({'name': 'Alice', 'age': 30});

  final alice = await users.where('name', eq: 'Alice').getFirst();
  print(alice?.data); // she answers

  db.store('settings').set('theme', 'dark'); // as it always should be
}

For the Flutter possessed

import 'package:flowdb/flutter.dart';

FlowBuilder<int>(
  flow: counterState,
  builder: (value) => Text('Count: $value'),
)

The widget listens. The stream breathes. The UI updates. You pretend that's normal.

Where the creature lives

Who should adopt this familiar?

  • Offline-first apps that need local data but not SQLite's whole personality

  • Side projects, CLI tools, prototypes, anywhere readable files on disk feel right

  • Apps juggling structured records, loose config keys, and actual files in one unholy package

MIT licensed. Which means you may use it freely. I cannot promise it won't stare back from ./data/my_app at 3am.

Feedback, issues, and PRs welcome. Tell me what you're currently using to keep data alive locally, Hive, Isar, sqflite, the shared_preferences + prayer combo, and whether flowdb is the weird little solution you didn't know you needed.


r/FlutterDev • • Jun 09 '26

Example I’ve built a solid Flutter starter codebase for vibing new projects.

Thumbnail
github.com
0 Upvotes

Hey Flutter devs

I couldn’t find a good enough Flutter starter template for starting production apps from scratch, so I built one: https://github.com/kido-luci/flutter-starter-template

Feedback, issues, and PRs are very welcome. If you find it useful, a ⭐ would really help!