Local LLMs running fully on device means user data never hits a server. No API calls, no logs, no third party agreements. For devs building sensitive apps, this isn't just a trend. It's the architecture shift we actually needed.
1
1
5
613
Not every widget needs its own file, fam. Splitting obsessively kills context. Sometimes keeping related widgets together is just cleaner code. Read the room, not the rulebook.
1
3
8
1,642
Clean Architecture in Flutter is mid for most apps. You're not building Google Maps. The extra layers just mean more files, more boilerplate, and slower shipping. Sometimes the real move is knowing when NOT to over-engineer.
10
2
51
2,627
Stop copy-pasting try-catch across every Flutter service. A Dio interceptor catches network and HTTP errors (timeouts, 401s, 404s) in one place. Just remember: it's your first line of defense, not the only one.
5
152
Do you use flavors? Yes | No 👇
3
1
163
Putting your Future inside FutureBuilder's build method restarts the task on every rebuild. Each build call creates a new Future object, and FutureBuilder compares by reference, so a new instance means a fresh start. Fix: initialize it once in initState(), store it in a field
2
8
4,281
Skipping dispose() on controllers and un-cancel()ed stream subs is how leaks hit prod. The order matters: dispose/cancel everything you own first, then super.dispose() last, never touch this after super runs. leak_tracker in tests catches the rest.
212
Using BuildContext after an async gap without a mounted check ships crashes to prod. Debug catches it; release burns users. The fix: if (!mounted) return in State, if (!context.mounted) return elsewhere (Flutter 3.7+). Better yet: don't pass context across async
69
SliverList shines in CustomScrollView for complex UIs. But for a simple list? ListView.builder is easier and wraps SliverList internally anyway. Use Slivers directly when composing SliverAppBar, SliverGrid, or SliverPersistentHeader combos.
1
78
Curious, what coverage percentage do you aim for in your codebase? Or do you even write tests at all? 👇
1
72
Half your pubspec solves problems the SDK already handles. HTTP? dart:io has HttpClient built in. Animations? AnimatedContainer, AnimatedCrossFade, no deps. Add only what's needed!
2
5
361
Flaky mobile sessions aren't always the network. Often it's retry logic. Back off 2^n sec with jitter, cap at 3. Retry only transient failures: timeouts, 5xx, 429 (429 is a 4xx). Skip the other 4xx. And only retry idempotent calls, or a timed-out POST can double-fire.
2
89
Precache network images to cut image pop-in: Store your NetworkImage (any ImageProvider) as a field... one stable instance, stable cache key. Call precacheImage(image, context) in didChangeDependencies, not initState... [1/3]
1
4
305
it touches inherited widgets via context, which initState can't. Optional bool guard so you don't re-precache each time didChangeDependencies re-fires. In build(), pass that same field into your Image widget, matching URL + scale hits the warm cache, so no pop-in. [2/3]
1
58
Got any other tips for this? 👇 [3/3]
38
Abdulkabir Adekanye retweeted
Diving into a completely new SDK and programming language can be intimidating 🫣 See how @redbrogdon used a multi-agent loop in @antigravity to quickly get up to speed on Python/ADK and build a Flutter frontend for deep research! → goo.gle/4p3gNm6
3
16
180
44,440
Deep links dying on cold start? Order, not luck. On applinks, uriLinkStream delivers the cold-start URI and every link after, but only if you create AppLinks() (a singleton) early. Route through gorouter. Create it late and the first link's gone.
2
362
Most search bars spam the API on every keystroke. Debouncing fixes that, but it's only half the job: async responses can arrive out of order and clobber fresh results with stale ones. The fix is debounce + a sequence guard so the newest query always wins.
1
4
358
Profile in debug mode. Numbers are okay. Run it in profile mode on a real device, see the real deal. Debug is JIT + asserts, intentionally slow, and it buries your real hotspots in the noise. Profile mode on a device is the only perf that's real
62
MaterialIcons-Regular.otf is ~1.6MB. Flutter tree-shakes it to a few KB (99%+) in release builds, keeping only glyphs you use. Hit a 'non-constant IconData' error? Don't use --no-tree-shake-icons, that re-ships 1.6MB. Fix the icon instead.
74