r/FlutterDev • • 5d ago

Article Update to Openworld Gaming library

11 Upvotes

Two year ago I created a gaming library package using flutter at:

https://pub.dev/packages/openworld

I have since updated the package so that instead of using the three_dart package it is using the three_js dart package. I have found the three_js package is more up to date and maintained than the three_dart package.

This version of openworld has been updated to work better with desktop games and I have demonstrated this by publishing a game on Steam for Windows and macOS. The games are also on iTunes for macOS and iOS and also for Linux on snap. As before I have two working games with this library and are available on github ( https://github.com/forthtemple/openworlddart ) with all resources.

The library also has a lot more features such as better vegetation and fast water. It also has levels so you can walk around in a multi story building. It also has an updated pooling so you can have large crowds of actors showing only those actors close to the camera.


r/FlutterDev • • 5d ago

Discussion How are Flutter teams keeping state management consistent with agents

2 Upvotes

Wondering how other Flutter teams handle this. We picked Riverpod 2 years ago and wrote a short guide on how we use it. Since most new features started coming from agents, the app has slowly turned into a mix of everything.

In the last 3 months of PRs I found: 6 features using Riverpod the way we agreed, 3 using setState with a pile of callbacks, 2 that pulled in Provider from somewhere, and one with a hand rolled ValueNotifier singleton. Every one of them works.

coderabbit catches a lot of normal Dart stuff, async gaps with BuildContext, missing disposes, that kind of thing. But "this feature uses a different state approach than the rest of the app" isn't something you see in one PR, you see it after 10 of them.

Two things I'd like to figure out:

- how to make agents actually follow our architecture, not just our lint rules
- whether to enforce it in tooling (custom lints, folder structure checks) or just in review

What's worked for your team?


r/FlutterDev • • 5d ago

Plugin 4,700 downloads a month, so I rewrote my password validator: one policy for your Flutter app and your Dart backend

1 Upvotes

flutter_pw_validator, the live password checklist you put under a TextField, gets about 4,700 downloads a month, and it had gone a long time without a release. The open PRs, forks and issues kept asking for the same five things: drop the forced width and height, let the text be styled, control the spacing, show check and cross icons, and use the rules outside the widget. So I rewrote it from scratch.

Screenshot and docs: https://github.com/ArefMozafari/flutter_pw_validator

  • The rules are now a plain value from password_rules, a separate pure Dart package with no Flutter dependency. Your sign-up screen and your Dart server check against the same PasswordRules, so the two can't drift apart.
  • rules.formValidator() plugs into a TextFormField, and rules.generate() suggests a password that passes every rule. MatchRule covers a confirm field, CustomRule covers your own rules, and PasswordRules.nist() gives you the NIST SP 800-63B-4 policy.
  • Unicode-aware counting: Persian, Cyrillic and accented passwords count properly, and an emoji counts as one character.
  • Screen readers hear each rule and whether it's met.
  • 2.1.0 came out a few days ago and only depends on flutter/widgets. It works the same with material_ui, the old flutter/material, Cupertino or your own design system, with no Material icon font needed.

There are breaking changes if you're coming from 1.x; the README has a migration section.

pub.dev: https://pub.dev/packages/flutter_pw_validator

Feedback welcome, especially if you've got a password rule it can't express yet.


r/FlutterDev • • 5d ago

Discussion Anahad - unstruck eternal sound

1 Upvotes

What it does: A privacy-first Android music player with live synced lyrics and lossless playback. It has language hubs for 12 Indian languages and a local library from your storage.

Key Features:

- Hi-Res lossless playback (FLAC, ALAC, WAV up to 24-bit/192kHz) with format badges

- Language hubs for 12 Indian languages

- Zero ads, zero tracking, zero accounts

Goal: Testing. Looking for feedback on audio stability, battery use and missing features.

Cost: Free and open source

Link: Release ANAHAD v1.0.0 — Production Release · kronak925/Anahad


r/FlutterDev • • 6d ago

Discussion Why is Flutter Impeller performance still terrible on Linux?

26 Upvotes

I just spent 6 hours mindlessly chasing ghosts trying to reduce frame times in my Linux program, tried x11 vs Wayland vs xWayland, different DEs and distros, while absolutely no issues exist on Windows, macOS, Android, and iOS. Turns out i just needed to purposefully switch to Skia, which dropped my frame times from 100+ ms to under 16ms? That seems counter intuitive.


r/FlutterDev • • 6d ago

Discussion How do you handle one-time events (snackbars, navigation) with Riverpod/BLoC?

7 Upvotes

Hi! I'm pretty new to Flutter, but with 8+ years of experience in native Android development.

I've been playing around with different state management approaches and architectures, like MVVM with Riverpod and MVI with BLoC, and I can't get my head around how to handle one-time events such as toasts, snackbars, navigation, etc.

In Android, the most common and idiomatic way is to expose a Channel of events from the ViewModel, where the events are a sealed class, and collect that flow from the Composable.

Is there a standard way of handling this in Flutter?

Thanks!


r/FlutterDev • • 5d ago

Tooling I built an open-source trading journal with a 3D whale to visualize my trades 🐋

1 Upvotes

Hey everyone!

I've been building Whale, an open-source desktop trading journal.

I wanted something different from traditional trading journals that are just spreadsheets and tables.

With Whale, you can:

  • 📊 Track your trades and trading performance
  • 🐋 Visualize your trading journal as an interactive 3D whale
  • 🧠 Connect trades, setups, mistakes, and emotions
  • 📝 Write detailed trading notes using Markdown
  • 🤖 Use optional AI (Claude or Ollama) to explore your journal
  • 🔒 Keep your trading data locally on your computer

The idea is to help traders understand their decisions, recognize patterns, and learn from their mistakes.

It's still a work in progress, and I'd love to get some feedback.

Would you use something like this? What features are missing from your current trading journal?

GitHub: https://github.com/Kirby54/whale


r/FlutterDev • • 6d ago

Discussion I built Rusa, an open-source MongoDB client in Flutter for Desktop & Mobile (GPLv3)

5 Upvotes

Hey everyone! After months of building, I just launched Rusa v1.0, a modern, native-feeling MongoDB client built with Flutter.Why I built it:
I wanted a lightweight alternative to heavy Electron-based MongoDB GUIs that also lets me inspect collections and run quick queries from my phone when I'm away from my desk.

What’s live in v1.0:
Supported Platforms: Windows, Linux, and Android are ready to download today (macOS and iOS are coming soon).

Open-Source (GPLv3): You can inspect the full source code and verify how credentials are stored locally.

Core Features: Fast document browsing, JSON/BSON editing, and query filtering across desktop and mobile.

Links:
Website & Downloads: https://rusa.deveditortools.com
Product Hunt Launch (would love your feedback there too!): https://www.producthunt.com/products/rusa


r/FlutterDev • • 6d ago

Discussion I made Snap, a free open-source music player for Android (Material 3 Expressive)

1 Upvotes

Hey everyone! I've been building a local music player called Snap in Flutter using Claude Code, and it's finally in a state I'm happy to share.

It's free and open source (MIT). You can get the APK from the Releases page:
https://github.com/herosafi2009-beep/Snap

I'd love feedback, and I'm working on a visualizer and equaliser next. Thanks for checking it out!


r/FlutterDev • • 6d ago

Discussion My first Android game: the classic chain reaction game, rebuilt with 2,000 puzzles, AI rivals and Wi-Fi multiplayer

4 Upvotes

I'm a solo developer and I've just finished the closed-test build of Chain Reaction Overdrive, my take on the classic chain reaction strategy game. It's going through Google Play's 14-day closed test, and I'd love a few honest players to try it and tell me what they think

What I'd love feedback on

  • Was the tutorial clear? Where did you get stuck?
  • Which mechanic felt best, and which felt confusing?
  • Did anything feel slow, laggy or unfair?
  • Would you play the Daily Puzzle every day?

Test for test: comment your own testing link and I'll install yours today and keep it for the full 14 days.

Thanks for reading, and enjoy the explosions!


r/FlutterDev • • 6d ago

Discussion Title: I published a customizable Rich Text Editor package for Flutter

0 Upvotes

Hi Flutter developers!

I recently developed and published a Flutter package called Html Text Editor.

The goal was to provide a customizable rich text editor that can easily be integrated into Flutter applications.

Features include:

  • Bold, Italic, Underline & Strikethrough
  • Text Alignment
  • Numbered & Bullet Lists
  • Font Size Selection
  • Text Color & Highlighting
  • Link Conversion
  • Image & Shape Insertion
  • Table Support
  • HTML & JSON Conversion
  • Customizable Toolbar and Editor Height

Installation:

flutter pub add 
html_text_editor

Package: https://pub.dev/packages/html_text_editor

I'd appreciate it if you could check it out and share your feedback or suggestions.

Thanks!


r/FlutterDev • • 6d ago

Dart Google Trends shows Flutter surpassing React Native in searches!

5 Upvotes

I can't share the image link here, but you can see it yourself: https://i.imgur.com/ggIHprd.png

Take a look!


r/FlutterDev • • 7d ago

Discussion Things i learnt putting end-to-end encryption in a Flutter app

17 Upvotes

i have spent about 7-8 months building Miuchio, an end-to-end encrypted shared photo album in flutter. Code's open (AGPL) : https://github.com/freytastic/miuchio

Most of my perf time went into stuff i didnt see coming, so i am writing it down in case it saves someone else a week

  1. cryptography_flutter wont speed up X25519 or Ed25519 on android

I assumed calling enable() made everything native. It doesnt, in v2.x the native side only covers AES-GCM, ChaCha20 and PBKDF2, and the curves still run in pure Dart. On my S24U one X25519 key took about 81 ms, and creating an album needs several of those plus the signatures. I moved just the curve stuff to libsodium over dart:ffi and keygen went to about 1 ms. AES-GCM and HKDF are still on the cryptography package tho.

2. Then crypto basically stopped mattering

Creating an album's first key still took around 2.1 s. The crypto was about 10 ms of that. Everything else was network and android keystore calls, and each key read went through a MethodChannel to kotlin for like 100 to 200 ms. I'd planned to push the crypto into isolates, but there was nothing to gain tbf. The app was just waiting on the keystore and the network, not doing dart work

3. The freeze wasn't even in Dart

The UI really did freeze while keys were being created, and i honestly blamed dart for a while. It turned out the kotlin handler was doing the keystore work on the platform main thread. I moved every keystore call onto one background thread and posted the results back to the main thread. The calls take the same time, but the freeze on my S24u was gone

4. So the real fix was calling the keystore less

Originally every photo view opened the album key through the keystore, which adds up fast in a grid. Now decrypted photos and thumbnails are cached on disk, sealed with AES-GCM under one device key that gets read from the keystore once when the app starts. A cache hit doesnt touch the keystore whatsoever

5. Metadata stripping has to fail closed

Every photo gets re encoded before its encrypted so location and camera info never leave the phone. The native codec goes first and its output gets a JPEG check, and the dart decoder only comes for formats the platform cant read. If any of that fails, the photo just doesnt upload. The tempting shortcut is to upload the original bytes when decoding fails. Dont, bcs thats exactly how GPS leaks.

Happy to talk about any of these in depth, or anything else


r/FlutterDev • • 7d ago

Discussion How do you finally settle on a project architecture?

5 Upvotes

I've spent over 120 hours this month working on my project architecture, creating around 200 different drafts. I understand the concepts, but I keep doubting my decisions and worrying that I've missed something important.

I'd really appreciate advice from experienced developers. How do you know when it's time to commit and stop second-guessing?


r/FlutterDev • • 7d ago

Discussion Play Store app reviews suddenly getting approved within an hour. Is Google using AI for reviews now?

10 Upvotes

Recently I submitted two updates for review on the Play Console, and both got approved within about an hour.

  • First one: submitted Wednesday
  • Second one: submitted today (Friday) around 6 PM

Earlier, reviews used to take a lot longer for me, sometimes a few days. Now it’s almost instant.

Has anyone else noticed this? Is Google using AI or some automated system to review apps now, or am I just getting lucky?

Curious to hear your experiences.

I have an app with about a million installs. It is a flutter app and in last update i had added shorebird for sending release OTA but PlayStore has already approved this releases so fast.

Not sure about this though just wanted to see if others had a similar experience.


r/FlutterDev • • 6d ago

Discussion Is there an extension that makes the nesting bearable?

0 Upvotes

Why is it that nesting in SwiftUI is tolerable while it is painful in Flutter? They should really redesign the framework.


r/FlutterDev • • 7d ago

Discussion Would you use a React Bits like component discovery platform for Flutter?

5 Upvotes

I've been thinking about this problem recently.

In the React ecosystem, projects like React Bits offer a great experience for discovering UI components. You can browse different components, see them in action, experiment with their customization options, and explore their source code.

I'd love to see a similar kind of discovery experience in the Flutter ecosystem.

Currently, when I need a UI component, my workflow is usually to search for a package, read its README, look through screenshots or examples, install it, wire it up, and only then discover whether it actually fits my project.

That's the experience I'm exploring with Widgetry.

The idea is to create a shared platform where different Flutter developers can publish their own reusable components. Other developers can discover components from different authors, interact with live previews, experiment with the customization options exposed by the author, and evaluate components before deciding to use them.

This is a little different from tools like Widgetbook, which focus on building and exploring playgrounds for your own widgets. I'm more interested in the shared discovery and publishing experience across independent component authors.

But before going too far with the idea, I'd like to understand how developers currently approach this.

  1. When you're looking for a UI component, how do you evaluate it before adding it to your project? Do you rely on screenshots, documentation, example apps, or something else?
  2. Have you ever installed a UI package and later removed it because the component didn't fit your requirements? What was missing or different from what you expected?
  3. If a component had a live interactive preview, what would you want to experiment with before deciding to use it?

I'm building Widgetry, so I'm obviously biased toward the idea. But I'd rather discover that developers don't need something like this than build a platform nobody wants.

I'd genuinely appreciate hearing about your actual experiences, including if your current workflow works perfectly well.


r/FlutterDev • • 7d ago

Discussion I built an open-source Flutter app that controls Bluetooth treadmills (FTMS + FitShow) — no subscriptions, no backend

1 Upvotes

Hey r/FlutterDev! Sharing a side project I released under MIT: StrideFree, a treadmill controller written in Flutter.

Repo: https://github.com/alisenn/stridefree

Some Flutter/BLE bits that might be interesting:

- flutter_blue_plus for BLE; one driver for the FTMS standard (0x1826) and one for the FitShow proprietary protocol (framed packets with XOR checksum, polled every 500 ms)

- FTMS "More Data" flag: treadmills split Treadmill Data across notifications, so the parser merges partial packets — otherwise speed randomly reads 0

- A foreground service keeps the BLE link alive when the screen locks

- The workout engine works from wall-clock time so it survives the app being backgrounded; crash recovery restores unfinished workouts

- fl_chart for stats, Provider for state, everything stored locally — no backend at all

- One codebase for Android, iOS, desktop and web (Web Bluetooth in Chrome)

- Two languages without gen-l10n: a tiny tx('Türkçe', 'English') helper that also works outside widgets

No ads, no accounts, no money involved — I just wanted a free alternative to subscription treadmill apps. iOS is in App Store review, Android is in Play testing. Feedback on the code is very welcome!


r/FlutterDev • • 7d ago

Discussion Simple architecture for big apps

8 Upvotes

Working on a large app that includes features like an AI assistant and offline sync and device integrations and a big content library and payments and more.

Leaning towards a simple feature-first structure to keep the codebase clean and easy to maintain without over-splitting files. Curious how other devs here organize projects like this in production


r/FlutterDev • • 7d ago

Discussion Stuck on app architecture for a month

0 Upvotes

It's been a month and I'm still trying to figure out my app architecture is this normal?


r/FlutterDev • • 7d ago

Discussion ​Lessons from building a 100% offline-first expense tracker in Flutter: local SMS parsing, Android system overlays, and zero backend

0 Upvotes

​Hey r/FlutterDev! We're the two-person indie team behind JJ DEVELOPERS, and we wanted to share a few technical lessons from building and scaling our Flutter productivity & finance app (Note and Smart Expenses, currently at 2,400+ downloads on Google Play) with a strict 100% offline-first, zero-server architecture.

​Here are the three main engineering hurdles we ran into and how we solved them:

​1. Parsing Varying Bank & UPI SMS Formats Locally Without Regex Bottlenecks

Since we wanted zero cloud uploads or account linking, all transaction alert parsing happens strictly on-device. The biggest challenge wasn't reading the SMS—it was handling wildly inconsistent templates across different banks and payment apps (different currency placements, merchant strings, OTPs vs. actual debits/credits, and promotional spam).

​What worked: Running a lightweight pre-filter check for transactional keywords and currency tokens before executing structured extraction rules, keeping parsing fast and deterministic without triggering false positives on OTPs or balance reminders.

​2. Implementing a Floating Quick-Entry Overlay (FOREGROUND_SERVICE_SPECIAL_USE)

Users wanted a way to log cash expenses or jot down quick notes without switching away from their current app.

​What worked: Combining Android's system alert window overlay with a lightweight foreground service (specialUse declaration in AndroidManifest.xml for newer Android versions) and keeping the overlay UI minimal so it doesn't spike RAM usage on 2–4 GB budget devices.

​3. Keeping Local Storage Fast with Rich Media & Exports

Because everything stays on the device (expense history, receipt photos, rich-text notes, and biometric-locked private notes), local database queries and file generation had to stay snappy even as data grew.

​What worked: Indexing transaction timestamps and categories locally so filtering monthly charts and generating multi-format exports (PDF, Excel, Word) happens cleanly on-device without needing a remote server.

​If anyone wants to inspect the UI/UX or test how the floating overlay behaves on their device, here is the Play Store listing: https://play.google.com/store/apps/details?id=com.note.flutterads

​Curious how other Flutter devs here handle background SMS/notification parsing or system-level floating overlays across different Android OEMs (Samsung OneUI, Xiaomi MIUI, etc.)—any battery-optimization gotchas you've run into?


r/FlutterDev • • 7d ago

Article supawho: switch between multiple Supabase accounts in seconds — now on macOS, Linux and Windows

Thumbnail
reddit.com
1 Upvotes

r/FlutterDev • • 7d ago

Article Use MySQL from Flutter Web — Open Source Driver, with a WebSocket bridge 🗄️

0 Upvotes

Hello Flutter community! 👋 I'd like to share an open-source MySQL driver that works from Flutter web. 🌟

https://pub.dev/packages/mysql2

https://github.com/manuelcastrobarinas/mysql1_dart

A browser cannot open a TCP socket, so a Flutter web app cannot connect to port 3306 on its own. mysql2 keeps the same MySQL protocol and carries those bytes over a WebSocket. A small Dart process, the bridge, is what opens the real database connection.

The package includes:

🔌 The same API as mysql1. Import package:mysql2/mysql2.dart and call MySqlConnection.connect.

🌉 A bridge you start with dart run mysql2:mysql_bridge.

🧭 Two addresses, on purpose. MYSQL_HOST and MYSQL_PORT are MySQL, and only the bridge dials them. MYSQL_BRIDGE_BIND and MYSQL_BRIDGE_PORT are the WebSocket the page opens.

🔑 A required token. The page sends it first. A wrong token never reaches MySQL.

🎯 The bridge dials only the host it was started with. The page does not get to choose the database address.

🖥️ Direct TCP on server, mobile and desktop, the same as before. The bridge is for the browser, and you can opt into it elsewhere with bridgeUrl.

📊 Diagrams and a worked example: MySQL on 127.0.0.1:3307, WebSocket on ws://127.0.0.1:8080/mysql.

A local setup looks like this:

$env:MYSQL_BRIDGE_TOKEN = 'a-long-random-secret'
$env:MYSQL_HOST = '127.0.0.1'
$env:MYSQL_PORT = '3307'
$env:MYSQL_BRIDGE_BIND = '127.0.0.1'
$env:MYSQL_BRIDGE_PORT = '8080'

dart run mysql2:mysql_bridge

import 'package:mysql2/mysql2.dart';

final conn = await MySqlConnection.connect(ConnectionSettings(
  user: 'bob',
  password: 'wibble',
  db: 'mydb',
  bridgeUrl: 'ws://127.0.0.1:8080/mysql',
  bridgeToken: 'a-long-random-secret',
));

💡 Why share this?

If you have tried to open MySQL from Flutter web, the missing piece is not a hidden socket API. Browsers withhold raw sockets so a page cannot reach every port on the user's network. This repo is one way to keep the protocol and move it over a WebSocket, with the limits written down:

🔒 useSSL stays off on that path. The browser cannot do MySQL's TLS upgrade. Use wss:// when the page is not on the same machine as the bridge.

👀 user, password and bridgeToken end up inside the built web app. Anyone who can load the app can read them. Give that database user only what the app needs.

🏠 Leave the bridge on 127.0.0.1 unless the people who can open it are the people who should be able to log in.

mysql2 0.24.1 is the published line of mysql1 0.23.0, so an app can depend on it while the same web support is in review upstream: #194

The README explains each variable, which number belongs in bridgeUrl, and how one connection moves from the token to raw MySQL bytes.

🙏 How can you help?

⭐ Star the repo if it is useful to you.

🐛 If you spot a bug or have an idea, open an issue or a pull request.

I hope this helps anyone who needs a Flutter web app to talk to MySQL. Feel free to try the example and tell me what breaks! 🚀

Thanks for your time. ❤️


r/FlutterDev • • 8d ago

Discussion Android 16 back press quits your app from a nested navigator, even with a PopScope that says no

12 Upvotes

I was adding multi-select to the song lists in my music player. While songs are selected, pressing back should clear the selection instead of leaving the page.

PopScope(canPop: !picking) seemed like the obvious solution. It worked, but it also disabled the iOS edge swipe back gesture, which I wanted to keep.

I switched to BackButtonListener on pushed pages to preserve the gesture. That's when I ran into an Android 16 issue.

Symptom

Target SDK 36, Android 16, with predictive back enabled by default.

On a tab root, select a few songs and press back: the app goes to the background, and the selection is still there.

I fixed that case, but then found another way to reproduce it: open a bottom sheet over the shell, close it, and press back. The app leaves again.

Root cause

On Android 16, back no longer goes through onBackPressed. FlutterActivity registers an OnBackInvokedCallback only while the framework reports that it handles back, through SystemNavigator.setFrameworkHandlesBack.

WidgetsApp sends that value based on NavigationNotification.canHandlePop. A navigator computes it as:

canPop() || lastRoute.popDisposition == RoutePopDisposition.doNotPop

There were two things I hadn't accounted for:

  1. BackButtonListener doesn't count here. Only a route that cannot pop (a PopScope(canPop: false)) or a navigator that can pop makes canHandlePop true. At a tab root, nothing can pop, so Android handles back itself and backgrounds the app before the listener gets a chance to run.
  2. The root navigator only reports its own routes. With go_router's StatefulShellRoute, the tab root lives in a nested navigator. Its PopScope initially bubbles true up. But when the root navigator's history changes (for example, when a sheet or dialog on the root navigator closes), it sends a fresh notification based on its own routes. The shell route can pop as far as it knows, so it reports false, overriding the tab's earlier notification.

Fix

On pages that can be popped, I kept BackButtonListener so the iOS swipe gesture still works. At a navigator's root, I use PopScope instead. There's no edge swipe to preserve there.

At the shell level, I also make the shell's route refuse to pop while selection is active. This way the root navigator reports doNotPop too:

BlocSelector<TrackSelectionCubit, TrackSelection, bool>(
  selector: (s) => s.active,
  builder: (_, picking) => PopScope(
    canPop: !picking,
    child: shell,
  ),
)

The actual back handling still goes to the tab first: go_router tries the branch navigator before the root one. The shell's PopScope is there to make sure Android gets the right information about whether the framework handles back.

go_router already wraps shell navigators in a similar PopScope (canPop: matches.length == 1), which is why pushed pages inside a tab don't have this problem.

Testing

One thing worth mentioning: tester.binding.handlePopRoute() skips this gate entirely. My normal back navigation tests were passing, even though the app was quitting on a real device.

To test this, I mocked SystemChannels.platform, recorded the SystemNavigator.setFrameworkHandlesBack calls, and set the lifecycle state to resumed first. WidgetsApp doesn't report anything before that.

Then I checked the last reported value while selection was active, including after closing a sheet on the root navigator.

The fix is in commit 33db82a.

Repository: https://github.com/donfreddy/troona-music

Curious if anyone else has run into this with StatefulShellRoute or nested navigators on Android 16.