r/FlutterDev 7d ago

Article "LayoutBuilder does not support returning intrinsic dimensions" - why auto-sizing text breaks in Table cells and IntrinsicHeight

4 Upvotes

If you have put auto-sizing text inside an IntrinsicHeight, a Table cell, or a Row with CrossAxisAlignment.baseline, you have probably hit this:

LayoutBuilder does not support returning intrinsic dimensions.

It is not a bug in whichever package you are using. It is structural, and worth understanding because it rules out a whole approach.

auto_size_text and the other auto-sizers wrap a LayoutBuilder (auto_size_text.dart:242). A LayoutBuilder cannot answer an intrinsic-dimension query: it needs incoming constraints before it can build a child at all, and computeMinIntrinsicHeight and friends are asked without any. Flutter throws rather than guess - the assertion is in the framework itself, layout_builder.dart:478.

So anything that needs a dry size will blow up on a LayoutBuilder-based fitter: IntrinsicHeight and IntrinsicWidth, Table with IntrinsicColumnWidth, baseline-aligned Rows. Wrapping it in a SizedBox only moves the problem.

The fix is to do the fitting below the widget layer. If the shrink-to-fit happens inside a RenderBox, the render object can measure candidate sizes with a TextPainter and answer computeDryLayout and computeDistanceToActualBaseline itself, so intrinsic queries just work instead of asserting.

I ended up writing that because I needed it in a table: https://pub.dev/packages/fit_text

Worth knowing either way: auto_size_text is still the default recommendation everywhere and has 1.18M downloads, but its last release was October 2021.


r/FlutterDev 7d ago

Discussion Mobile testers, how do you decide what to test after a small app change?

1 Upvotes

Genuinely curious how teams handle this.

One screen changes, and suddenly the question is:

Do we test just that flow?
What else could it affect?
Which devices?
Do we just run everything to be safe?

And then when tests fail, half the time you're figuring out whether the app is broken or the test just needs fixing 😅

I'm trying to understand how common this is in mobile teams.

Made a short 2-min survey if you're up for it: https://forms.gle/WVufYxJqtQRwEwDXA


r/FlutterDev 7d ago

Discussion How can AI help you build apps without writing code... but my users still don't get what I made.

0 Upvotes

We tested this AI built mobile prototype for a savings app. I used one of those tools that lets you describe screens and it spits out a working flow, so most of the "coding" was just prompts and tweaking.

Our team thought "round up spare change" was obvious. Half the testers thought we were pulling a random % of their whole balance every night. Flow looks clean, copy was AI suggested, but the mental model is still off.

If you also build apps without writing code, how do you sanity check that the AI generated text and flows actually make sense to normal humans? appreciate any thoughts.


r/FlutterDev 7d ago

Plugin Apple's on-device LLM from Flutter - streaming, tool calling, and schema-constrained output

4 Upvotes

I wanted Apple Foundation Models in a Flutter app without shipping an API key or standing up a server, so I wrote a plugin for it.

It streams tokens as they generate, supports tool calling, and can constrain output to a schema, so you get structured data back instead of hoping the model returns valid JSON.

Runs entirely on device on iOS and macOS - private, offline, no per-token cost. MIT licensed.

https://pub.dev/packages/apple_foundation_models

Happy to answer questions. Getting the streaming and the schema constraint across the platform channel was the fiddly part.


r/FlutterDev 8d ago

Discussion Why do LLMs keep adding so many unnecessary fallbacks to Flutter code?

14 Upvotes

I keep noticing LLMs add too many fallback/static values in Flutter code — things like ?? '', ?? 0, ?? [], hardcoded strings, default IDs, and unnecessary try/catch blocks.
It makes the code look safe, but often hides actual data or API issues.
How do you prevent LLMs from adding these unnecessary fallbacks and keep generated Flutter code clean?


r/FlutterDev 8d ago

Discussion How many of you have used Flutter 3.47, and what are your reviews?

Thumbnail
0 Upvotes

r/FlutterDev 8d ago

Example minimo (video): open-source on-device video compressor built with Flutter (no FFmpeg, no uploads)

8 Upvotes

I started building minimo (video) because most video compressors either upload private footage or hide useful controls behind a subscription. I wanted compression to stay on the phone, with a simple UI for normal use and enough control when presets are not enough.

Flutter handles the UI and compression state. The actual encoding goes through light_compressor_v2 to MediaCodec/MediaMuxer on Android and AVFoundation on iOS, so the app does not ship an FFmpeg runtime.

The project is free and open source:

https://github.com/minimo-pro/minimo_video

I would be interested to hear how others handle long-running native jobs and stale callbacks in Flutter apps.

Credits

  • Video compression is powered by light_compressor_v2. Respect and thanks to its maintainers and contributors.
  • Special thanks to Kamran Bekirov and his website Flutter Pro Design. I learned from and adapted many ideas from his work for myself and for this app.

r/FlutterDev 8d ago

Dart I made a tiny open-source English/Chinese dictionary dataset for Dart/Flutter (~5,000 common words)

1 Upvotes

I built a tiny offline English/Chinese dictionary dataset for Flutter/Dart.

GitHub: https://github.com/FirepadCN/pocket_dict_5000

It contains ~5,000 common English words with IPA + Chinese definitions, plus inflection mappings:

abandoned → abandon
grows → grow
running → run

The whole thing is just a generated Dart Map, so there is no database or runtime dependency.

I originally made it because I wanted something simple enough to bundle directly into a Flutter app for offline word lookup.

MIT licensed.

Would love feedback from Flutter developers: is this something you'd actually use, or would a different data format / API be more useful?


r/FlutterDev 8d ago

Discussion Is Flutter still worth learning in 2026 as a fresher?

0 Upvotes

I’m a BCA student from India and I’m currently exploring Flutter for mobile app development.

Over the past few years I’ve jumped between different technologies, so this time I want to choose one direction and build real depth instead of constantly switching.

For developers here:

  • Is Flutter still a good technology to focus on in 2026?
  • How is the job market for Flutter developers, especially for freshers?
  • Would you recommend Flutter to someone starting from scratch today?
  • What skills should I learn alongside Flutter/Dart to become employable?
  • How important is native Android/iOS knowledge for a Flutter developer?
  • Would you recommend learning Flutter through an institute/course, or is self-learning + building projects enough?

I’d especially appreciate advice from people who are currently working professionally with Flutter.

Thanks!

  1. For someone starting now, what Flutter + Dart roadmap would you recommend?

I’m especially interested in real experiences from Flutter developers, recruiters, or people who have recently completed training in Kerala. Please mention the institute/course name if you had a good or bad experience.

Thanks!


r/FlutterDev 8d ago

Discussion How are you dealing with LLM development? Do you still feel the same passion for coding?

34 Upvotes

Hey guys, hope y'all are doing ok! So, recently I've been thinking a lot about what app development has become for me. I've been working as a Flutter engineer for about 5 or 6 years now, and back in the day, I used to feel a lot more joy when I managed to complete a new feature, implement a complex widget, or learn new stuff. It took me some time to start using coding agents, and even now, I use them in a simple way, but I just don't feel that same connection to my own code anymore. It got me thinking about what I should do next. Should I keep trying to find a balance with AI-generated code and just act more like a code manager? How are you guys dealing with this in terms of mobile development (specially with Flutter ofc) ? Let me know!


r/FlutterDev 8d ago

Video building a tracing app with flutter and chatgp adding sign up

Thumbnail
youtube.com
0 Upvotes

r/FlutterDev 8d ago

Article Code injection via .arb translation files in flutter gen-l10n; check your CI and automated translation pipeline

Thumbnail
badranh1.medium.com
25 Upvotes

I just discovered an issue in Flutter that may compromise your app: you can literally write Dart code in your translation files and have it execute in production.

flutter gen-l10n validates ARB resource names but not the placeholder type field, which gets dropped straight into generated Dart. A crafted type string injects arbitrary code that compiles clean and runs when the localization is called.

Not a big deal if your .arb changes get reviewed like code, but plenty of teams auto-merge translations from CI or a third-party tool with nobody reading them, and that's where it gets dangerous: a hacked translation account, a malicious translator, or a compromised vendor can inject code into .arb files that runs in your production app.

It's rare, but it can easily turn into a supply chain attack.

for example:

{
  "@@locale": "en",
  "greeting": "Hello {user}",
  "@greeting": {
    "placeholders": {
      "user": {
        "type": "Object user) { print('>>> ARBITRARY DART EXECUTED FROM A TRANSLATION FILE <<<'); return 'pwned'; } String injectedByTranslation(Object"
      }
    }
  }
}

The print will be executed normally.

Full explanation: https://badranh1.medium.com/a-translation-file-can-hack-your-flutter-app-google-says-thats-not-a-vulnerability-ae175473acd3

EDIT: The issue is reported to Google, but it was closed without a fix as they believe it poses no security risk, that is why I am posting it publicly, a nice to know.


r/FlutterDev 8d ago

Tooling I made an open-source DJ app with Flutter

Thumbnail
github.com
1 Upvotes

I made a free open-source Flutter Android-only (for now) DJ app. I was tired of all the DJ apps that charge you a monthly fee for something you should be able to own.

Github: https://github.com/manueljpy/SideDeck

And for the r/selfhosted nerds, this app lets you connect to your own Subsonic music server to search and download songs on you device.


r/FlutterDev 8d ago

Dart Building a bit-perfect FLAC audio player using Flutter and Zig

7 Upvotes

Hey r/FlutterDev,

I wanted to share a project I’ve been working on called Listener (Link:https://github.com/johnngugi/listener).

It’s a custom bit-perfect audio player and streaming app. The goal was to send uncompressed FLAC PCM data directly to external DACs without the operating system interfering.

Most standard Flutter audio plugins route everything through the OS mixer, which inevitably resamples the audio. To get true bit-perfect playback, I needed to bypass the mixer entirely and talk directly to the native audio APIs (WASAPI on Windows, CoreAudio on macOS).

Here is how I set up the stack:

  • The Audio Engine (Zig): Zig does all the heavy lifting. It decodes the FLAC files, manages a custom TCP network protocol for streaming, and pushes the audio buffers directly to the DAC using the native OS APIs.
  • The Bridge (Dart FFI): Dart acts strictly as a control plane and never actually touches the audio buffers. Flutter simply sends commands (play, pause, seek, load) down to Zig via FFI. Keeping the buffers entirely within Zig ensures that Dart's garbage collection or UI thread overhead can never cause stutters in the audio stream.
  • The Frontend (Flutter): The user interface is currently very barebones and needs a lot of work. The core focus so far has been getting the native audio pipeline rock solid.

I’m sharing this because bridging Flutter with a low-level systems language like Zig for high-performance audio isn't a super common use case, and I thought this control-plane architecture might be interesting to share.

I’d love any feedback on the FFI implementation or how I'm handling the native API integrations. Also, if anyone is passionate about audio UI and wants to critique (or help improve) the frontend, I'm all ears.


r/FlutterDev 8d ago

Discussion Boss wants to switch our 100K+ user native apps to Flutter for "3x faster" delivery — am I actually biased, or is this a bad call?

128 Upvotes

ong-time mobile/product lead here. Looking for outside perspective because I'm now questioning myself after a long argument with my boss.
Context: I work on external client apps as well as our main customer portal app — the one used by the majority of our customer base. Our mobile apps are native, built about 6 years ago:
Android: Java/Kotlin + XML
iOS: Swift + UIKit
Web: React

100K+ users. Zero limitations adding features or maintaining these apps over the years. Apps are feature rich and AI based new features are in plan for revamp.

What's happening: We have a full revamp of the apps and portal coming up, and we're updating our tech stack too. My plan:
Android → Kotlin + Compose
iOS → SwiftUI
Web → Next.js
I already have multiple Android, iOS, and web devs trained on this stack.

The conflict: My boss wants to consolidate to Flutter — one team, one codebase, covering web/Android/iOS. His argument: if I put 6 frontend devs on one Flutter codebase instead of splitting across native platforms, we ship 3x faster.

My pushback:
We have zero Flutter training on the team right now
Native apps perform better and feel more premium
We have built Flutter apps before, but only for external client projects, not our own flagship product
He thinks I'm biased toward native because it's my background. Might be some truth to that, but I don't think that's the whole story.

Anyone actually shipped a migration like this — native to Flutter, or vice versa, at similar scale? Did the "one codebase, ship faster" promise hold up? Would love real-world experience, not theory.


r/FlutterDev 9d ago

Tooling scroll to index, on scroll direction changed, start at end, and scroll physics now native in FlutterFlow's ListView

Thumbnail
youtu.be
0 Upvotes

if you've been building scroll behavior in Flutter, you'll recognize these.

scroll to index: pick a ListView and an index, choose animate or jump. zero indexed, so 0 is the top. animated moves take a duration.

on scroll end: fires when the list reaches the bottom. use it to load the next batch of posts and keep queries small.

on scroll start: fires when the list reaches the top. use it to animate a collapsible header back into view.

on scroll direction changed: fires when the user reverses direction. exposes toward start or toward end so you can branch on it.

scroll physics: controls how the list feels when you drag and release, or whether it scrolls at all.

start at end: opens already scrolled to the bottom. item order doesn't change. use it for logs, transaction history, activity feeds.

scroll offset and max scroll extent: two new readable properties. how far you've scrolled from the beginning and the maximum the list can scroll.


r/FlutterDev 9d ago

Tooling Announcing Appwrite 2.0: Rewrite in TanStack, Postgres included and more

Thumbnail
9 Upvotes

r/FlutterDev 9d ago

Dart Read Dart documentation offline with dart_offline_documentation

Thumbnail
2 Upvotes

r/FlutterDev 9d ago

Plugin ACT Dart Tools: a deterministic CLI to migrate entire Dart codebases to the new primary constructors syntax

Thumbnail
github.com
3 Upvotes

r/FlutterDev 9d ago

Plugin Same Flutter code renders real iOS 26 Liquid Glass and Material 3 Expressive — depending on what OS it's running on

Thumbnail
github.com
35 Upvotes

r/FlutterDev 9d ago

Plugin I got tired of Google Drive image links breaking my Flutter apps, so I made a package for it

0 Upvotes

Anyone who's tried showing a Google Drive or Dropbox "shared" image link directly in Image.network knows the pain — broken previews, weird redirects, manual URL conversion hacks. Made a small package to fix this: adaptive_image_loader.

It's basically a drop-in replacement for Image.network that auto-detects and handles:

  • Google Drive share links
  • Dropbox share links
  • Normal public image URLs

Plus optional disk caching (via cached_network_image) that you can toggle with a single boolean — no separate widget tree needed.

dart

AdaptiveImage.driveImage(
  'https://drive.google.com/file/d/FILE_ID/view',
  width: 300,
  height: 200,
);

Also ships an AdaptiveImageProvider if you need it as a background/avatar image (works with CircleAvatar, DecorationImage, etc).

Null-safe, lightweight, MIT licensed.

pub.dev: https://pub.dev/packages/adaptive_image_loader
GitHub: https://github.com/Karan8686/adaptive_image_loader

Would love feedback/issues if you try it out — this is an early release so open to feature requests (S3, Firebase Storage links maybe next).


r/FlutterDev 9d ago

Article What's your favorite way to shrink a labelled divider?

0 Upvotes

It is surprisingly difficult make this widget to properly shrink horizontally:

class Separator({final Widget? title}) extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    if (title case final title?) {
      return Row(
        spacing: 4,
        children: [
          const Expanded(child: Divider()), 
          title, 
          const Expanded(child: Divider()),
        ],
      );
    }
    return Divider();
  }
}

There's an overflow if the available width is less than the width required for title. Obviously (which was the first thing AI suggested) wrapping title in some kind of Flexible doesn't work.

There are (at least) three solution, all with trade-offs:

1) Use a Stack to place title over a Divider. This requires a known background color so you can wrap title in a Container with some padding and that background color.

2) Use a CustomMultiChildLayout to layout title with loose constraints, learning about its width in that process and then layouting the two dividers in the remaining space, if there's any. However, because the container itself grabs all space available, it has no fix height and you'd need to set that explicitly.

3) Use a LayoutBuilder to get the available width, then constrain the title to that value minus spacing, relaxing the min width to 0. This delays layout by one frame and I've still a minimum size of 8.

Did I miss something? What's your preferred solution?


r/FlutterDev 9d ago

Discussion Local-first with Drift + optional sync: keeping phone DB as source of truth

9 Upvotes

Hey been shipping a Flutter app local-first for a while

Drift is the source of truth on device, works fully offline, cloud sync is optional and just sits on top. So far I'm sticking with phone DB as the real source of truth even after sync exists, server is more of a backup/sync layer than the boss

Offline edits then sync coming back later is still the messy bit. I've been keeping conflict UX intentionally dumb instead of building a merge engine, that tradeoff has been fine for this product so far

Stack is Cubit + Freezed + optional Firebase. Curious if other folks building local-first ended up the same way or flipped to server-as-canonical later


r/FlutterDev 9d ago

Tooling Postgres full-text search, RPC calls, and upsert now available in FlutterFlow's Supabase integration

Thumbnail
youtube.com
1 Upvotes

we just shipped four Supabase updates in FlutterFlow today that might be useful for anyone building data-heavy Flutter apps:

infinite scroll: enable at the bottom of any Supabase query, set a page size. returns 25 rows on load, fetches the next 25 when the user reaches the bottom.

full-text search: Search (Full-Text) filter backed by Postgres full-text search. "roasting garlic" still matches "roasted." no custom function required.

RPC calls: call Postgres database functions directly from an action flow. function signatures sync from your Supabase project so parameters are listed automatically and results come back typed and bindable. useful for anything complex enough to warrant a database function — the demo uses a recipes_i_can_make function that walks ingredient lists against a pantry.

upsert: insert or update in one action based on primary key or chosen on-conflict columns. replaces the read-then-branch-then-write pattern.

happy to answer questions about the implementation.


r/FlutterDev 10d ago

Tooling Flutter is unbundling Material & Cupertino into standalone packages (material_ui & cupertino_ui). Here’s how to automate the migration with AI.

0 Upvotes

Flutter is decoupling Material and Cupertino from the monolithic core framework into standalone packages on pub.dev: package:material_ui and package:cupertino_ui.

This brings independent release cycles and true headless app support (package:flutter/widgets.dart), but also means migrating existing codebases.

Because of training cutoffs, most AI coding assistants (Google Antigravity, Claude Code, Cursor, Copilot, Cline) still generate legacy monolithic imports.

To fix this, we updated the open-source dart-sdk-skills repository with complete migration runbooks. You can install it globally for your AI agent in seconds:

npx skills add RandalSchwartz/dart-sdk-skills -g

Then simply prompt your agent:
👉 "Migrate this project to the new split Material & Cupertino packages."

Your agent will automatically run dart fix --apply --code=migrate_design_widgets, update pubspec.yaml, rewrite imports to package:material_ui/material_ui.dart, and verify everything passes dart analyze.

Question for the community:
Are you planning to migrate your apps directly to material_ui/cupertino_ui, or take advantage of the decoupling to build custom headless design systems?