r/FlutterDev

I built a native crash reporter for Flutter using Google Crashpad

I built a native crash reporter for Flutter using Google Crashpad

I've spent quite a bit of time doing native desktop development in C++, and one thing that background has made me particularly aware of is that not every crash in a Flutter application is a Dart exception, something that became evident in my latest proprietary project, it being a desktop app relying on many native integration packages.

A segfault in a native library, an access violation in some FFI code, or a crash in the engine itself can take down the entire process before Dart gets a chance to do anything about it.

That's why I built fl_crashpad, a Flutter package that brings Google's Crashpad into Flutter applications.

Resources:

Why not just use Sentry or Firebase Crashlytics?

Those are perfectly valid solutions, especially if you want a complete observability platform. But I didn't want another all-in-one service for my own applications.

I wanted something smaller and more independent: native crash capture, with fine-grained control over what happens to the resulting reports.

I'm also extremely attentive to user privacy and therefore the data my applications send outside the user's machine. I try to ship the absolute minimum necessary, and crash reporting is one of those areas where it's easy to collect far more than you actually need.

Features in detail:

  • Privacy first: Minidumps can contain sensitive information, so the package includes built-in sanitization for data such as usernames and time zones to reduce the amount of potentially identifying information that leaves the user's machine.
  • Full control over data flow: Keep reports on disk, inspect or delete them, or transfer them using your own infrastructure. An optional upload mechanism supports a purposefully configured remote minidump endpoint.
  • Cross-platform support: Linux, Windows, macOS, Android and iOS, with platform-specific implementation details handled by the package.
  • Diagnostic context: Add fixed and runtime annotations, along with attachments, to provide additional context for captured crashes.

Personal Notes:

  • For my own apps, I don't even use the built-in remote minidump backend. I use my own Supabase Storage endpoint to transfer reports, the package doesn't need to know which storage provider you use. You know where the report lives on disk, and you decide how to move it, when to do so, and which endpoint receives it.
  • Sanitization isn't a guarantee that every possible secret has been removed from a minidump. It's one layer of protection, and the data flow still needs to be designed carefully. But I wanted privacy to be a consideration in the implementation itself, not something left entirely to the application developer.

Feedback, questions, and criticism are very welcome!

u/_Wilielmus_ — 4 days ago

I built an Package that works as MCP server that lets AI coding agents inspect and interact with a running Flutter app

I've been experimenting with ways to make AI coding agents more useful when working on Flutter apps, and I built an open-source tool for it.

The idea is simple: instead of asking an AI agent to guess what's happening inside a running app, let it connect to the app's Dart VM Service and inspect the live runtime.

With flutter_ai_whisper, an MCP server, an agent can:

  • 🔍 Discover and connect to a running Flutter debug app
  • 🧠 Inspect live state holders, including Bloc/Cubit, GetX, Riverpod, and plain Dart objects
  • ✏️ Evaluate Dart expressions to change runtime state
  • 🧭 Navigate to existing named routes
  • 🛠️ Work without adding a Flutter dependency or modifying the app just to expose test hooks

For example, you can start your app with flutter run and ask your AI agent:

>Connect to the running Flutter app. Read the counter, set it to 42, and tell me what the screen shows.

The goal is to make debugging and exploring existing Flutter apps more interactive for AI coding agents.

Tech details:

  • Uses MCP over stdio
  • Connects through the Dart VM Service
  • Supports debug-mode Flutter apps, including Flutter Web with some capability limitations
  • MIT licensed and open source

There are limitations: it requires a debug session, and runtime evaluation executes Dart code with the app's privileges. It should only be used with apps you control, on localhost—not production apps or exposed VM Service ports.

🔗 GitHub: https://github.com/RajKavadia/flutter_ai_whisper

🎬 The repository includes a demo video and setup instructions.

I'm interested in feedback from other Flutter developers, especially:

  1. What would you want an AI agent to inspect or control in a running Flutter app?
  2. Would you find runtime state inspection useful in your current AI-assisted workflow?
  3. What capabilities or safety controls would you want before using something like this regularly?

I'd appreciate constructive feedback, ideas, and contributions!

u/ObjectiveAddress3051 — 4 days ago
▲ 3 r/FlutterDev+1 crossposts

Made a CLI that fails CI when someone imports data/ from presentation/, looking for feedback

Hi all, I'm the author of arch_guard, an open-source (MIT) CLI + analyzer plugin for Dart/Flutter.

The problem: we agree on Clean Architecture / Bloc / feature-first at the start, and a few months later widgets import repository implementations directly and features import each other. The analyzer and tests don't catch it.

What arch_guard does:

  • Layer rules with presets for clean_architecture, riverpod, bloc and feature_first. dart run arch_guard init detects which fits your folders and writes the config.
  • Forbidden packages per layer, e.g. domain may not import flutter or dart:io.
  • Circular dependency detection (Tarjan's SCC) that names the one import to remove to break each cycle, plus --explain <file>.
  • IDE warnings with quick fixes via the arch_guard_lint analyzer plugin: the bad import gets underlined as you type, with "Remove this import" / "Allow layer X to import Y".
  • Baselines: record existing problems once, and CI fails only on new ones. --since origin/main limits a PR's report to files it changed. This is what makes it usable on an app that's been around for years.
  • expectArchitecture() to run the same checks in flutter test.
  • GitHub Action that comments on PRs, SARIF for Code Scanning, pre-commit hook.
  • Interactive HTML dependency graph (offline), Mermaid, DOT, JSON.
  • Works with Dart workspaces / Melos monorepos, with rules for which packages may depend on which.
dart pub add --dev arch_guard
dart run arch_guard init
dart run arch_guard

[screenshot / GIF]

Docs: https://creatorpiyush.github.io/arch_guard/ pub.dev: https://pub.dev/packages/arch_guard GitHub: https://github.com/creatorpiyush/arch_guard

Two questions for you:

  1. What folder structure does your team use? I'd like to know which presets are missing.
  2. For those who try the IDE plugin: which quick fix would you want next?
reddit.com
u/creatorpiyush — 4 days ago
▲ 0 r/FlutterDev+1 crossposts

Hot take: Frameworks like Flutter are officially worthless in the AI era.

Let’s be real for a second. Why do frameworks like Flutter even exist? They’re just abstractions. cuz we like it easy. We built them because raw native code and complex platform APIs are too messy for our human brains to manage at scale. We needed widget trees, syntax sugar, and complex state management libraries just to keep our sanity intact while building out frontends.

I hate Java but Objective C is probably number 2.

But AI doesn't need human-friendly abstractions.

An LLM doesn’t get a headache managing a massive, hyper-optimized native codebase. It doesn’t care about boilerplate, and it definitely doesn't need our simplified wrappers to understand how a UI should render. It can write, refactor, and connect pure native code instantly. We don't need this shit anymore.

Stop wasting time memorizing the quirks of the latest UI framework. The future of our industry isn't writing code—it’s Product Management, Project Management, and QA. Our new job is to define the exact product scope, manage the AI's build pipeline, and aggressively test the output to make sure it actually works and its SAfe!!!!!!. The era of human-readable abstractions is dead; let the models handle the raw native reality.

And while we're at it, fuck BLoC and fuck Riverpod. FYI my apps use Riverpod as a human I love it but we dont need it anymore. Those overly engineered state management libraries only exist because our fragile human working memory can't keep track of application state without drowning. An AI doesn't complain about boilerplate. It can write, trace, and scale pure, raw InheritedWidget infrastructure flawlessly without breaking a sweat. We spent years endlessly arguing on Reddit over which state management solution is the "cleanest" for us to read, the only good thing we we agreed on is that getx is shit and even ai knows getx is shit, while an LLM can just wire up the raw native APIs perfectly in seconds without any bloated third-party dependencies.

what are you going tu support Swift PAckage Manager???? bro fuck that shit!!!! lets write RAW code!

Also r/flutterhelp should be shutdown we just get non english speaker vibecoders now, there is no real contribution bro most of their questions could be answered by a a google search and 100% would be answered if they used a cheapo Chinese open wight model to do the work... sorry for your loss

reddit.com
u/ChuckQuantum — 9 days ago

That innocent-looking compareTo callback might be freezing your 60 FPS timeline

A few days ago, a Flutter developer wrote a profiling post about sorting 10,000 timeline events. Under a section they called "The Original Sin", they pointed out the culprit:

items.sort((a, b) => DateTime.parse(a.start).compareTo(DateTime.parse(b.start)));

In an O(N log N) sort, that callback runs over 215,000 times for 10,000 items. On a mobile isolate, parsing 215,000 ISO strings takes 180ms+ and drops a dozen frames.

To fix it, they mapped the list to a temporary helper object with pre-parsed dates, sorted by the cached key, and unwrapped it.

That Map -> Sort -> Map pattern was actually what I posted to Usenet back in 1994 (what became known as the Schwartzian Transform). But what surprised me running benchmarks in modern Dart: package:collection's sortedBy does not cache keys either—it still ran 127,000 redundant key evaluations because mergeSortBy re-evaluates keys during merges.

With Dart 3 records, you don't even need throwaway helper classes anymore—a boxed record one-liner or simple extension method runs in 14ms (13x faster).

Have you ever caught a subtle frame stutter hiding inside a sort or compare callback?

reddit.com
u/RandalSchwartz — 13 days ago
▲ 8 r/FlutterDev+1 crossposts

xverb: a Total Commander style file manager in Flutter, with Python plugins like Blender

been working on xverb for a while, its a two panel keyboard driven file manager for windows, mac and linux. all flutter, GPL-3.0

the part i think is interesting for this sub: the core only manages files, everything else is a plugin. viewers, ftp/smb, archives, dir compare are python plugins running in their own process. for platforms where you cant run code theres declarative extensions, pure json built from the host's render primitives

some stuff that was fun to get right in flutter desktop: native clipboard + drag and drop with explorer/finder, internal draggable windows that go fullscreen on phone, and a pluggable virtual fs so zip: is just a scheme a plugin serves

still early, android builds but barely tested, ios not at all. would love feedback esp on the plugin api

github.com/xsm909/xverb

site + downloads: xverb.pages.dev

u/XSM909 — 11 days ago
▲ 28 r/FlutterDev+1 crossposts

flutter3d: a 3D engine for Flutter, with three games you can play in the browser right now

I've been working on flutter3d for a long time. It's a 3D engine, based on Flutter GPU/WebGL, with a game layer over it, and four genre packages built out. Three of those are on pub.dev. MIT License, and these packages are not affiliated with the Flutter team in any way.

Easiest thing is to just try it, with no install: shooter, platformer, racer. Those are the same builds running on web backend, with the same level files and the same simulation code. Also you can build MacOS / iOS / Android app from the source code and create your own game, based on the genre template or generic package flutter3d_app.

Docs: https://flutter3d.pleion.dev

Source: https://github.com/pleiondev/flutter3d

What's in it

The renderer implements the usual things: scene node graph, glTF/GLB and OBJ support and my own .f3d container, which loads a lot faster, 6 lighting models, shadows, bloom, SSAO, SSR, skinning, morph targets, BVH culling.

The game templates runs with a fixed timestep and can be recorded as a tape, which means a run can replay exactly and a bug report can be sent as an attachment. Collisions and the character controller are plain Dart with no renderer dependency, so they can be tested with ordinary unit tests.

Three backends implements common interface: based on flutter_gpu/Impeller for desktop and mobile platforms, WebGL2 in the browser (WebGPU in progress), and also a software rasteriser written in Dart. The CPU rasterizer can be used to test the renderer in CI with no GPU.

Performance measurement on a Mac: 50,000 moving instanced units held 120Hz.

Limits

It's just version 0.5.x, so APIs can be changed between minor versions. There's no compute shaders at all at this moment, because flutter_gpu doesn't expose it (there is issue on flutter/flutter#188474), and that blocks GPU particles, GI and volumetrics (now they are implemented on CPU). The strategy game package really works but I haven't published it, because I haven't written the guide for it yet.

Things I'd like help with

To run it on hardware I don't own, especially Android.

There's a dart2wasm bug I've failed to find. The browser demos ship as dart2js because the wasm build throws framebufferTexture2D: parameter 4 is not of type 'WebGLTexture' on the first frame.

reddit.com
u/DmitriiZolotov — 14 days ago

What Flutter feature took you the longest to understand?

I've been working with Flutter for a while, and I'm curious about other developers' experiences.

For me, understanding state management and how rebuilds work took quite a bit of time.

What Flutter concept took you the longest to understand when you were learning?

reddit.com
u/Dismal-Boss6421 — 12 days ago
▲ 4 r/FlutterDev+1 crossposts

Need face AR for internal B2B tool with video calls, don't want to build it from scratch

Working on an internal B2B tool that includes video calls. Need face AR, such as real-time beautify/retouch , virtual backgrounds, that kind of thing. No interest for us to build face AR and tracking from scratch. Not our focus, just want something that works well and plugs into Flutter without too much pain.

What are people actually using for this? Looking for real experience, not names. How the integration, any issues at scale, anything you'd avoid next time?

reddit.com
u/DaineLusian — 13 days ago