Skip to main content

Command Palette

Search for a command to run...

๐ƒ๐š๐ฒ ๐Ÿ‘๐Ÿ‘ โ€” ๐“๐ก๐ž ๐Œ๐จ๐ฌ๐ญ ๐‚๐จ๐ฆ๐ฆ๐จ๐ง ๐Œ๐ข๐ฌ๐ญ๐š๐ค๐ž๐ฌ ๐ƒ๐ž๐ฏ๐ž๐ฅ๐จ๐ฉ๐ž๐ซ๐ฌ ๐Œ๐š๐ค๐ž ๐ฐ๐ข๐ญ๐ก ๐๐‹๐จ๐‚, ๐Œ๐•๐•๐Œ, ๐๐ซ๐จ๐ฏ๐ข๐๐ž๐ซ & ๐†๐ž๐ญ๐—

Updated
โ€ข1 min read

After years of building Flutter apps, Iโ€™ve realized โ€”
the problem isnโ€™t the architecture.
Itโ€™s how we use it.
Here are the 6 biggest mistakes I see developers make

๐Ÿ. ๐Œ๐ข๐ฑ๐ข๐ง๐  ๐”๐ˆ ๐š๐ง๐ ๐‹๐จ๐ ๐ข๐œ
Putting http calls or business logic directly in widgets breaks separation of concerns.
๐Ÿ‘‰ Keep UI reactive, logic in BLoC/ViewModel, and data in Repository.

๐Ÿ. ๐€๐๐ˆ ๐‚๐š๐ฅ๐ฅ๐ฌ ๐–๐ข๐ญ๐ก๐จ๐ฎ๐ญ ๐‹๐š๐ฒ๐ž๐ซ๐ฌ
Donโ€™t call APIs directly in your BLoC.
Use a structure like:
๐ด๐‘ƒ๐ผ โ†’ ๐‘…๐‘’๐‘๐‘œ๐‘ ๐‘–๐‘ก๐‘œ๐‘Ÿ๐‘ฆ โ†’ ๐ต๐ฟ๐‘œ๐ถ โ†’ ๐‘ˆ๐ผ

๐Ÿ‘. ๐‹๐จ๐œ๐š๐ฅ ๐ƒ๐ ๐ƒ๐ข๐ซ๐ž๐œ๐ญ ๐€๐œ๐œ๐ž๐ฌ๐ฌ
Never call Hive or SQLite directly from UI.
Create a LocalDataSource and connect it through Repository for offline-first design.

๐Ÿ’. ๐Ž๐ฏ๐ž๐ซ-๐„๐ง๐ ๐ข๐ง๐ž๐ž๐ซ๐ข๐ง๐  ๐“๐จ๐จ ๐„๐š๐ซ๐ฅ๐ฒ
You donโ€™t need enterprise architecture for a to-do app.
Add layers when needed โ€” but name and structure them consistently.

๐Ÿ“. ๐๐จ๐จ๐ซ ๐’๐ญ๐š๐ญ๐ž ๐ƒ๐ข๐ฌ๐œ๐ข๐ฉ๐ฅ๐ข๐ง๐ž
Whether using Provider, BLoC, or GetX โ€” manage rebuilds, close streams, and dispose controllers properly.

๐Ÿ”. ๐“๐ซ๐ž๐š๐ญ๐ข๐ง๐  ๐€๐ซ๐œ๐ก๐ข๐ญ๐ž๐œ๐ญ๐ฎ๐ซ๐ž ๐‹๐ข๐ค๐ž ๐š ๐“๐ซ๐ž๐ง๐
Frameworks change โ€” good architecture stays.
Predictability > Perfection.

Iโ€™m applying all this to my 180 Days Challenge โ€” building ๐Š๐ข๐ญ๐š๐š๐› ๐Š๐ข๐จ๐ฌ๐ค, a 360ยฐ book ecosystem app.
๐ถ๐‘™๐‘’๐‘Ž๐‘› ๐‘Ž๐‘Ÿ๐‘โ„Ž๐‘–๐‘ก๐‘’๐‘๐‘ก๐‘ข๐‘Ÿ๐‘’ ๐‘“๐‘Ÿ๐‘œ๐‘š ๐‘‘๐‘Ž๐‘ฆ ๐‘œ๐‘›๐‘’ โ„Ž๐‘’๐‘™๐‘๐‘  ๐‘Ž๐‘ฃ๐‘œ๐‘–๐‘‘ ๐‘โ„Ž๐‘Ž๐‘œ๐‘  ๐‘™๐‘Ž๐‘ก๐‘’๐‘Ÿ.

๐‘น๐’†๐’Ž๐’†๐’Ž๐’ƒ๐’†๐’“:
๐’€๐’๐’– ๐’…๐’๐’โ€™๐’• ๐’๐’†๐’†๐’… ๐’‘๐’†๐’“๐’‡๐’†๐’„๐’• ๐’‚๐’“๐’„๐’‰๐’Š๐’•๐’†๐’„๐’•๐’–๐’“๐’† โ€” ๐’‹๐’–๐’”๐’• ๐’‚ ๐’‘๐’“๐’†๐’…๐’Š๐’„๐’•๐’‚๐’ƒ๐’๐’† ๐’๐’๐’†.

Image is depicting the simple and powerful flutter app structure, hope it will help...

More from this blog

๐—œ๐˜€ ๐—”๐—ป๐—ฑ๐—ฟ๐—ผ๐—ถ๐—ฑ ๐—ฆ๐˜๐—ถ๐—น๐—น ๐—ข๐—ฝ๐—ฒ๐—ป? ๐—ง๐—ต๐—ฒ ๐—ฆ๐˜๐—ผ๐—ฟ๐˜† ๐—š๐—ผ๐—ผ๐—ด๐—น๐—ฒ ๐——๐—ผ๐—ฒ๐˜€๐—ป'๐˜ ๐—ช๐—ฎ๐—ป๐˜ ๐—ฌ๐—ผ๐˜‚ ๐˜๐—ผ ๐—ž๐—ป๐—ผ๐˜„

Imagine the world before smartphones were everywhere. Back in 2003, a small project called Android was bornโ€”not initially as a mobile phone OS, but to create an advanced operating system for digital cameras. The goal was simple but powerful: build a ...

Nov 11, 20252 min read
๐—œ๐˜€ ๐—”๐—ป๐—ฑ๐—ฟ๐—ผ๐—ถ๐—ฑ ๐—ฆ๐˜๐—ถ๐—น๐—น ๐—ข๐—ฝ๐—ฒ๐—ป? ๐—ง๐—ต๐—ฒ ๐—ฆ๐˜๐—ผ๐—ฟ๐˜† ๐—š๐—ผ๐—ผ๐—ด๐—น๐—ฒ ๐——๐—ผ๐—ฒ๐˜€๐—ป'๐˜ ๐—ช๐—ฎ๐—ป๐˜ ๐—ฌ๐—ผ๐˜‚ ๐˜๐—ผ ๐—ž๐—ป๐—ผ๐˜„
F

Flutter Fumes

6 posts