Data Layer Clinic

Paste your Flutter data layer — posture, inventory, ranked findings, corrected Dart fragments.

Back to SkillSafe
Or pick files: they are read locally, nothing uploads until you run.
Context — what the app is, what lives outside this paste
How it works

Nothing to hand? Load the — a StatefulWidget that opens the database at a hard-coded path, interpolates the search box straight into rawQuery, ships a live API key, swallows write errors and stuffs a JSON blob into shared_preferences — or the , where the correct verdict is well-architected and the useful output is what to add next.

1

Paste the code — the prescan is free

No upload, no AI: the prescan reads every class, SQL table and data package in your browser and lists what it mechanically found. The unit inventory, then the flags — SQL built with $value interpolation instead of ? + whereArgs, widgets that open the database or call HTTP themselves, database and network calls with no repository layer, models with mutable public fields, table and column names inlined in each query, CREATE TABLE without an INTEGER PRIMARY KEY AUTOINCREMENT id, a database handle used with ! and no open() guard, raw JSON work inside repositories, hard-coded database paths, API keys in source, empty catch blocks, and JSON blobs stored in shared_preferences. Each group explains why it matters. This part costs nothing and happens while you type.

2

The AI reviews it — this is the metered part

A senior Flutter engineer's pass: an architecture posture with the single most important change named, the inventory with each unit's role, and prioritized findings across architecture, SQL safety, models, offline sync, caching, error handling and hygiene — each with the problem, the concrete impact (an injectable query, UI state drifting from disk, data lost in a swallowed write error, a key extractable from the APK), the fix and a corrected Dart fragment. Every prescan flag is confirmed or explicitly set aside. Findings may only cite classes and tables that actually appear in your paste. Pricing is honest: a worst-case amount is reserved before the run and only what the run actually uses is charged — the meter next to the button shows both.

3

Fix, export, re-run

Quick wins for the one-line changes, focus areas tied to specific findings for the real work, and the corrected fragments as one commented file you can open next to your sources — plus per-finding snippet copy, the findings table as CSV (snippet column included) and Markdown or JSON export. Signed in, every review is saved to your account and follows you between devices; run it again after your edits and the page shows what cleared, what is still open and what is new since last time, compared in your browser for free.

Derived from the @flutter/flutter-working-with-databases skill (BSD-3-Clause, flutter/agent-plugins).