The Flutter & Dart tracker
One bookmark for everything Flutter and Dart on this site.
This pillar collects every post on the site about Flutter and Dart — the 3.x release cycle, Dart isolates, platform channels, state-management migrations, jank profiling, CI workflows, and the long tail of exception fixes.
What to read first
Start with profiling jank with DevTools and writing a Dart isolate for CPU-bound work - pair it with isolate vs thread. For state management, Provider vs Riverpod vs Bloc settles the choice, then provider to Riverpod walks the common migration; if you’re already on it, Riverpod 2.x to 3.0 covers the new major and ref.watch vs ref.read is the callback trap. For routing, go-router vs auto_route vs Navigator 2.0 settles the stack, and StatefulShellRoute’s currentIndex keeps the NavigationBar in sync. Leaving Hive? Hive to drift is the safe import.
For the engine and tooling story, Impeller as the default desktop renderer is the newest change. Flutter 3.44 splitting Material and Cupertino out of the SDK is the biggest packaging change; moving your imports to material_ui and cupertino_ui is the migration, dart fix across a whole repo applies it in one pass, and the undefined awaitNotRequired error is the lockfile snag; on iOS, CocoaPods to Swift Package Manager is the matching migration. On the web, CanvasKit vs skwasm picks the renderer. On Android, moving to AGP 9 with built-in Kotlin is the toolchain migration, and background location on Android 15 needs a location foreground service.
What’s on this page
The list below auto-collects posts tagged with any of: flutter, dart. Newest first.
Index (154 posts)
2026 / 10
- Expanded vs Flexible in Flutter: FlexFit.tight vs FlexFit.loose explained
Use Expanded when a child must fill its share of a Row or Column, and Flexible when it may be smaller than its share. Measured layouts on Flutter 3.44 show where the leftover space goes, why loose children never donate it to siblings, and when only Flexible survives unbounded constraints.
- unawaited_futures vs discarded_futures in Dart: which lint catches which un-awaited call
unawaited_futures only looks inside async bodies, discarded_futures only inside sync bodies, and both miss arrow functions, tear-offs, and collection literals. Measured case by case on Dart 3.12.2 and Flutter 3.44.8, with the analysis_options.yaml I recommend.
- Fix: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is X, expected version is Y (Flutter Android)
A dependency was built with a Kotlin at least two minor versions newer than your build's compiler. Raise the org.jetbrains.kotlin.android version in settings.gradle.kts to X minus one or later, or pin the dependency back.
- Fix: Bad state: Stream has already been listened to in Flutter
A single-subscription stream accepts exactly one listen() for its whole life. Create the stream once and give it to one listener, or share it with asBroadcastStream or Stream.multi.
- Fix: PlatformException(sign_in_failed, com.google.android.gms.common.api.ApiException: 10) with Google Sign-In in Flutter
ApiException: 10 is DEVELOPER_ERROR: Google does not recognize the package name plus signing certificate SHA-1 of the installed APK. Register the SHA-1 of the key that actually signed the build, and pass the Web client ID as serverClientId.
- How to Define Custom Design Tokens with ThemeExtension and Animate Them Between Light and Dark Themes in Flutter
Subclass ThemeExtension, register one instance per ThemeData through the extensions list, read it with Theme.of(context).extension<T>(), and write a real lerp so MaterialApp's AnimatedTheme interpolates your tokens during a light/dark switch. Covers colors, radii, shadows, text styles and booleans, the missing-extension crash, the copyWith trap that drops every other extension, and why you need == and hashCode, all verified with widget tests on Flutter 3.44.8.
- How to Make AnimatedSwitcher Animate When the Child Widget Type Does Not Change in Flutter
AnimatedSwitcher only transitions when Widget.canUpdate says the new child is a different widget, so Text to Text with no key just updates in place. Here is the one-line fix, where the key has to sit, why UniqueKey is a trap, the slide-direction bug caused by a static transitionBuilder, and the layout jump from the default Stack, all verified with widget tests on Flutter 3.44.8.
- How to Restore UI State After Android Process Death in Flutter with RestorationMixin
Android kills backgrounded Flutter apps to reclaim memory, and when the user comes back every StatefulWidget starts from scratch. Here is how to opt in with restorationScopeId, RestorationMixin and Restorable properties, restore text fields, scroll offsets and pushed routes, write a custom RestorableValue, and test it all with restartAndRestore and adb, verified on Flutter 3.44.8 and an Android 16 emulator.
- How to Catch Uncaught Async Errors in Flutter with runZonedGuarded and PlatformDispatcher.instance.onError
FlutterError.onError only sees errors thrown inside framework callbacks. Unawaited futures, timers, streams, and code after an await go somewhere else. Here is which handler catches which error, measured on Flutter 3.44.8, and the main() setup that catches all of them, including on web.
- How to Replay the Latest Value to Late Subscribers of a Dart Stream Without rxdart's BehaviorSubject
A broadcast StreamController drops every event that fired before you subscribed. Here is a dependency-free BehaviorSubject replacement built on Stream.multi, a replayLatest() extension for existing streams, the async* shortcut that silently loses events, and the StreamBuilder initialData detail, all verified on Dart 3.12.2.
- Migrate a Flutter App's Local Storage from Hive to Drift (hive_ce 2.22 to drift 2.35)
A one-time, crash-safe import of existing Hive boxes into a drift SQLite database on the user's device: schema design, the import function, idempotency, deleting the boxes, and the two gotchas that silently corrupt data (DateTime precision and class-name collisions). Tested on Flutter 3.44.8 with hive_ce 2.22.0 and drift 2.35.2.
- Fix: pubspec.lock shows as modified after flutter upgrade or switching Flutter versions
The Flutter SDK pins versions of meta, vector_math, test_api and matcher, so every SDK change re-resolves your lockfile, and flutter upgrade runs pub upgrade on the project you stand in. Pin one Flutter version per repo and enforce the lockfile in CI.
- Fix: "does not support provisioning profiles" when archiving a Flutter iOS app after migrating to Swift Package Manager
A provisioning profile passed to xcodebuild on the command line applies to every SwiftPM resource bundle target. Set manual signing on the Runner target instead.
- How to Keep the NavigationBar Selected Tab in Sync with the Current Route Using StatefulShellRoute in go_router
Drive NavigationBar.selectedIndex from StatefulNavigationShell.currentIndex, never from a setState field or a copy made in initState. Measured on Flutter 3.44.8 and go_router 18.0.2: which patterns drift on deep links, context.go and cross-branch pushes, why location-based indexes lie, and how to react to tab changes with didUpdateWidget.
- Genkit Dart 1.0: GenkitRouter Replaces startFlowServer, and Old Flutter Clients Need a Flag
Genkit Dart 1.0.0 freezes the API, moves HTTP serving into core with GenkitRouter, and changes the streamed error frame. Shipped Flutter apps on a 0.17 client need sendLegacyErrorFrame.
- What Is a Flutter Flavor, and How Is It Different from a Build Mode?
A build mode (debug, profile, release) decides how Flutter compiles your Dart code. A flavor (dev, staging, prod) is a native build variant you define in Gradle and Xcode that decides which app you ship. They are independent axes: 2 flavors times 3 modes is 6 builds. Verified on Flutter 3.44.8 with AGP 9.0.1, source checked against 3.47.7.
- Migrate a Flutter iOS App from CocoaPods to Swift Package Manager (Flutter 3.44 to 3.47)
Flutter 3.44 made Swift Package Manager the default for iOS and macOS, but an existing app keeps CocoaPods until you remove it. How to check which plugins are SwiftPM-ready, let the tool migrate the Xcode project, delete the Podfile safely, handle pods-only plugins and custom Podfile logic, and roll back if you need to.
- Migrate a Flutter Windows or Linux desktop app to Impeller (Flutter 3.47)
Flutter 3.47 makes Impeller the default renderer on Windows and Linux. What actually changes underneath (it is still OpenGL ES, not Vulkan), how to A/B test against Skia on a built binary, a per-machine kill switch for release builds, and why your golden tests will not notice.
- Migrate custom page transitions after the Flutter page transition builders reorganization (Flutter 3.44 to 3.47)
Flutter moved PageTransitionsBuilder and two built-in builders into the widgets layer and CupertinoPageTransitionsBuilder out of Material. What actually breaks (one import, with a misleading 'Not a constant expression' error), what dart fix does and gets wrong for material_ui projects, and how to rewrite custom builders and routes so they no longer depend on Material at all.
- Fix: Bad state: No suitable NDK found for target architecture arm64 in a Flutter build
The android_libcpp_shared build hook (0.2.0 and older) cannot find your NDK, or your minSdk is above the NDK's newest API. Upgrade to 0.2.1+, or install an NDK that covers your minSdk.
- Fix: BoxConstraints forces an infinite height in Flutter
A widget asked for height: double.infinity inside a parent with no height limit, like a Column or ListView. Use Expanded, a finite height, LimitedBox, or SliverFillRemaining instead.
- Fix: ClassNotFoundException for MainActivity when a Flutter Android app launches
The manifest's .MainActivity resolves against the Gradle namespace, and no class with that name is in the APK. Make namespace, the Kotlin package line, and the manifest agree.
- Fix: Timeout waiting to lock journal cache in a Flutter Android build
Another Gradle process holds ~/.gradle/caches/journal-1 and cannot hand it over. Find the Owner PID, kill that daemon, and stop deleting .lock files: that only moves the error.
- How to reserve space for an adaptive AdMob banner in Flutter to avoid layout shift
The official google_mobile_ads sample renders nothing until onAdLoaded, so your content jumps by 150 dp seconds after the screen appears. Ask for the anchored adaptive size first, reserve it with a SizedBox, persist the height across launches, and only then load the ad. Measured on Flutter 3.44.8 with google_mobile_ads 9.1.0.
- Fix: Undefined name 'awaitNotRequired' from material_ui or cupertino_ui on Flutter 3.44
material_ui 1.3.0 and cupertino_ui 1.1.0 use an annotation Flutter 3.44 does not export. Both are retracted, but a lockfile keeps them. Downgrade, then upgrade, to land on 1.2.0 and 1.0.2.
2026 / 09
- Fix: CERTIFICATE_VERIFY_FAILED: unable to get local issuer certificate in a Dart 3.13 Docker image
Dart 3.13 removed the VM's built-in fallback root certificates. Put a CA bundle in the runtime image: COPY /runtime/ from dart:stable or install ca-certificates.
- Fix: Can't have modifier 'final' here on parameters after upgrading to Dart 3.13
Dart 3.13 reserves final and var in parameter lists for primary constructors. Run dart fix --apply --code=extraneous_modifier to strip them, and use parameter_assignments instead.
- How to speed up a slow Dart analysis server in VS Code for a large Flutter monorepo
A monorepo with dozens of pubspec.yaml files makes the Dart analysis server build one analysis context per package, which is where the memory and the minute-long startup go. Convert to a pub workspace, exclude generated code in analysis_options.yaml, drop legacy analyzer plugins, and use the Insights page to prove it. Measured on Dart 3.12.2: 2.3x less peak memory and half the cold analysis time.
- Fix: Flutter debugger jumps into binding.dart on hot reload with no error shown
A dwds bug in Flutter 3.35 web sent a fake pause on every hot reload. Upgrade to Flutter 3.38+, or switch VS Code back to 'Debug my code' so package frames are skipped.
- Fix: YouTube embed shows "Video unavailable" (Error 152 / 153) in Flutter with youtube_player_iframe
Error 153 means YouTube got no Referer; 152 means the page claims to be youtube.com. Upgrade youtube_player_iframe to 6.0.2 and set origin to https://<your app id>, or use youtube-nocookie on 5.x.
- Fix: e: Daemon compilation failed: null in a Flutter Android Gradle build
On Windows, Kotlin incremental compilation fails when the Flutter project and the pub cache sit on different drives. Move PUB_CACHE to the project's drive or turn off IC for pub-cache plugins.
- Fix: Failed to decode advisories for archive from https://pub.dev in flutter pub get
The advisories warning in pub get is harmless: pub get exits 0. pub.dev fixed the bad response on 2026-05-04. If you still see it, the cause is a mirror or proxy.
- How to block a Flutter WebView from navigating to external URLs with NavigationDelegate
Keep a Flutter WebView on your own domain with webview_flutter 4.14.1: parse the URL, compare Uri.host instead of startsWith, hand mailto: and tel: to url_launcher, and know what Android and iOS actually send to onNavigationRequest.
- How to keep Flutter location tracking running in the background on Android 15
Run a Flutter location tracker that survives the Home button, a swipe from recents and a reboot on Android 15 and 16: a location-typed foreground service in its own Flutter engine, the exact permissions, and the SecurityException you get when the while-in-use rules bite. Tested with geolocator 14.0.3 and flutter_foreground_task 11.0.3.
- Migrate a Flutter Android project to AGP 9 with built-in Kotlin
The full path from an AGP 8 Flutter app that applies kotlin-android to AGP 9.1 with android.builtInKotlin=true on Flutter 3.47. Every step was built and measured, including the two edits that look optional and are not: kotlinOptions is a compile error under KGP 2.2+, and the KGP line in settings.gradle.kts has to stay.
- Migrate off describeEnum in Flutter before it is removed
describeEnum has been deprecated since Flutter 3.16 and its removal PR is approved. How to replace every call with Enum.name (Flutter 3.47.4, Dart 3.13), handle enum-like classes and diagnostics, find the calls hiding in dependencies like flutter_svg 1.x, and what the build error looks like once it is gone.
- Raise a Flutter macOS app's minimum deployment target to macOS 12 for Xcode 27
Xcode 27 refuses to build anything below macOS 12, and Flutter 3.47 moved its own floor from 10.15 to 12.0. What the automatic migration rewrites, the three places it silently skips (custom values, Podfile post_install overrides, plugin podspecs), and a Podfile fix for teams still on Flutter 3.44.
- CanvasKit vs skwasm for Flutter web in 2026: which renderer should you ship?
Ship skwasm with flutter build web --wasm when your dependencies compile to Wasm: it downloads less and rendered 36% more frames than CanvasKit on a heavy scene. On Flutter 3.47.x, keep it single-threaded until the multi-threaded text crash fix leaves beta.
- Fix: Unexpected failure parsing device information from adb output in Flutter
Flutter 3.47.0 cannot parse adb rows whose serial is 22+ characters, so wireless and some USB Android devices vanish. Upgrade to 3.47.1 or later, or adb connect by IP.
- Fix: flutter doctor --android-licenses says 'The --licenses option is no longer needed' with cmdline-tools 23
cmdline-tools 23.0 retired sdkmanager --licenses, so Flutter before 3.47.3 reports license status unknown. Upgrade Flutter, or pin cmdline-tools 22.0.
- Fix: Flutter Text renders off-screen in an Android WebView when system font scaling is enabled
Flutter web 3.41 to 3.44 reports a ~625x line-height override when an Android WebView's textZoom is not 100. Upgrade to 3.47, or clear the override in MaterialApp.builder.
- Fix: Flutter web serves a stale cached build after reloading the browser tab
A reload only revalidates index.html, so an unhashed main.dart.js keeps coming from the browser cache. Send Cache-Control: no-cache for the Flutter build output, stamp a build id where you cannot set headers, and let the self-cleaning service worker retire pre-3.41 caches.
- Fix: The argument type 'TextTheme' can't be assigned to the parameter type 'TextTheme?' with google_fonts
Your app imports material_ui but google_fonts 8.2.1 still returns the SDK TextTheme. Build the TextTheme yourself from GoogleFonts.roboto tear-offs until google_fonts migrates.
- Fix: Could not create Dart VM instance in a Flutter release build after flutter upgrade
The release APK shipped without libapp.so. Flutter 3.44.0 to 3.44.4 could drop it: upgrade to 3.44.5 or later and split the combined subprojects block.
- How to run dart fix across a whole repo to apply Flutter breaking-change migrations
dart fix takes one target directory and it can be the repo root: the analyzer opens a context per nested pubspec.yaml and migrates every package in one pass. Here is the full flag surface, the four things that silently suppress fixes and make a dirty repo report Nothing to fix, why the exit code is useless in CI, and a case where a Flutter transform emits code that does not compile.
- How to stop ImageIcon from tinting an icon with the ambient IconTheme color in Flutter
ImageIcon flattens a multi-color PNG into a silhouette because it always applies ColorFilter.mode(iconThemeColor, BlendMode.srcIn). Flutter 3.47 adds useOriginalColors to switch that off. Here is why passing color: null never worked, what useOriginalColors silently drops, and the hand-rolled replacement for older SDKs.
- How to keep appFlavor populated after a hot restart when using flutter attach
flutter attach has no --flavor option, so the resident compiler it spawns never defines FLUTTER_APP_FLAVOR and the appFlavor const collapses to null on the first hot restart. Three fixes: default-flavor in pubspec.yaml, flutter run --use-application-binary, and a platform channel that reads the flavor natively. Verified on Flutter 3.47.2 / Dart 3.13.2.
- How to detect a backspace press on an empty Flutter TextField in an OTP input
onChanged never fires because no edit happens, and on iOS the engine's deleteBackward returns without touching anything when the field is empty. Two approaches that actually work on every platform: a zero-width sentinel that guarantees an edit, and a single EditableText behind painted cells. Verified on Flutter 3.47.2 / Dart 3.13.2.
- ref.watch vs ref.read in Riverpod: what is the difference and when do I use each?
ref.watch subscribes and rebuilds, ref.read reads once and never rebuilds. Use watch in every build method and read only inside event callbacks. Here is the decision matrix, the source of both methods in flutter_riverpod 3.4.3, and the four silent failure modes: watch in a callback, read in a provider body, read on an autoDispose provider, and read used as an optimization.
- What is a Flutter Key and when does omitting it cause bugs?
A Key is the identity half of Widget.canUpdate, the one line of framework code that decides whether an Element and its State are reused or thrown away. Here is what that means in practice, the exact list edits that corrupt state without keys, which key type to reach for, and where the key has to sit to work.
- Migrate a Flutter web app from dart:html to package:web and dart:js_interop
A step-by-step migration off the deprecated dart:html, dart:js_util, and package:js onto package:web 1.1.1 and dart:js_interop: how to find every offending import with the dart2wasm compiler, what dart fix does and does not rename, the JSImmutableListWrapper and innerHTML traps, and how to verify with flutter build web --wasm.
- Migrate Flutter Material and Cupertino imports to the material_ui and cupertino_ui packages
The full migration off package:flutter/material.dart and package:flutter/cupertino.dart onto material_ui 1.1.1 and cupertino_ui 1.0.2: what dart fix --code=migrate_design_widgets rewrites, why third-party widgets start throwing ancestor-lookup errors, what MaterialUiCompatibilityBridge actually fixes, and how the flutter_localizations dependency changes.
2026 / 08
- Fix: Firebase Auth sign-in does not persist in a Flutter Android release build
Firebase Auth restores the Android session from a private SharedPreferences file with no network call, so a release-only sign-out is never broken persistence. It is a different google-services.json, a rejected token refresh, App Check, or your own catch block.
- Fix: The method 'getInvocation' isn't defined for the type 'DartObjectImpl'
build_runner fails to compile because source_gen 3.1.0 or 4.0.0 calls an analyzer API removed in analyzer 8.4.0. Upgrade the generator that pins source_gen below 4.0.1.
- What is the difference between a Dart isolate and a thread?
A thread shares memory with every other thread in the process. A Dart isolate does not: it owns its heap, runs one event loop, and talks to other isolates only by messages. Here is what that means at the VM level, where isolate groups blur the line, and how it plays out in Flutter, FFI, and on the web.
- How to test a Flutter widget at a fixed point in time without a withClock closure
Inside testWidgets the ambient clock from package:clock is already fake, but it starts at whatever wall time the test began. Pin it for a whole suite by overriding runTest on a custom AutomatedTestWidgetsFlutterBinding installed from flutter_test_config.dart. Verified on Flutter 3.44.2, clock 1.1.2, fake_async 1.3.3.
- Fix: A restricted method in java.lang.System has been called in a Flutter Gradle build
The JEP 472 warning on JDK 24+ is harmless and prints once. Fix it by matching your JDK to a Gradle version that supports it, not by pasting flags into gradle.properties.
- Fix: [firebase_messaging/apns-token-not-set] APNS token has not been set on Flutter iOS
getToken() runs before APNs hands iOS the device token. Poll getAPNSToken() until it returns non-null, then call getToken(). Check the Push Notifications capability if it never arrives.
- Fix: Flutter UI overlaps the Android system navigation bar after targeting SDK 35
Targeting Android SDK 35 puts your Flutter app in edge-to-edge mode, so the Scaffold body draws behind the navigation bar. Consume the insets with SafeArea and MediaQuery padding instead of opting out, because the opt-out is already dead on Android 16.
- Fix: Toolchain installation does not provide the required capabilities: [JAVA_COMPILER]
Gradle is compiling with a JRE. It is not searching your machine, it is using the exact JVM it was launched on. Point flutter config --jdk-dir at a real JDK, or clear org.gradle.java.home.
- Flutter 3.47.1 Stops a Transitive Package From Injecting Native Code Into Your App
The 3.47.1 hotfix validates plugin class and package identifiers before they land in GeneratedPluginRegistrant. Here is the hole it closes, the regex that closes it, and the other 11 fixes in the release.
- Fix: The class 'GoogleSignIn' doesn't have an unnamed constructor
google_sign_in 7.0.0 made GoogleSignIn a singleton. Replace GoogleSignIn(scopes: ...) with GoogleSignIn.instance, await initialize() once, then call authenticate().
- Fix: Unable to find a destination matching the provided destination specifier in a Flutter iOS build
iOS 26 simulator runtimes are arm64-only, so a leftover EXCLUDED_ARCHS arm64 line builds an Intel-only Runner no simulator can execute. Drop the exclusion.
- Flutter 3.47 Makes Impeller the Default Renderer on Windows, Linux, and macOS
Flutter 3.47.0 stable flips desktop apps from Skia to Impeller without touching a line of your runner code. Here is what moves, how to opt out on each platform, and why that opt-out is temporary.
- Riverpod Notifier vs AsyncNotifier vs StreamNotifier in Flutter: which one do I extend?
Pick by the return type of build(): T means Notifier, FutureOr<T> means AsyncNotifier, Stream<T> means StreamNotifier. Here is the decision matrix, the type hierarchy that explains why, and the == filtering and state-clobbering gotchas that bite each one. Verified against flutter_riverpod 3.4.2 on Flutter 3.44.2.
- Fix: An error occurred while preparing SDK package NDK (Side by side): Not in GZIP format
The SDK Manager is re-unpacking a corrupt archive it cached in .downloadIntermediates. Delete that folder and the half-extracted ndk/<version> directory, then re-run the build.
- Fix: Google Play rejects a Flutter or .NET MAUI app for missing 16 KB memory page size support
Play rejects the bundle because a 64-bit .so still has 4 KB ELF segments. Find the offending library, rebuild it with NDK r28+, and verify with zipalign -P 16.
- Fix: mprotect failed: 13 (Permission denied) in a Flutter iOS debug build
iOS blocks the Dart VM from flipping memory pages to executable, so JIT dies at startup. Upgrade to Flutter 3.35.0 or later for iOS 26, 3.32.0 for iOS 18.4. There is no entitlement that fixes it.
- How to replace Flutter's deprecated Radio groupValue and onChanged with RadioGroup
Radio.groupValue and Radio.onChanged were deprecated after Flutter 3.32 and RadioGroup shipped in 3.35. A step-by-step migration for Radio, RadioListTile and CupertinoRadio, why dart fix cannot do it for you, and the generic type-inference trap that silently renders a migrated radio disabled. Verified on Flutter 3.44.2 stable.
- Fix: flutter doctor reports cmdline-tools component is missing
Install the Android SDK Command-line Tools so the binaries land in <sdk>/cmdline-tools/latest/bin, point ANDROID_HOME at the SDK root, then re-run flutter doctor.
- Fix: No Material widget found in Flutter
Wrap the subtree in Material(type: MaterialType.transparency) or put the screen in a Scaffold. MaterialApp alone does not provide a Material ancestor, which is why TextField and InkWell assert.
- How to build an infinite-scrolling paginated list in Flutter with ScrollController
Attach a ScrollController to a ListView.builder, fire the next page when position.extentAfter drops below a prefetch threshold, and guard the fetch with isLoading, hasMore, and error flags. Full implementation plus the short-first-page trap.
- How to enable multi-window support in a Flutter desktop app
Flutter 3.44.8 stable still ships no public multi-window API. Here is how to turn on the experimental windowing feature flag on the main channel, use RegularWindowController and WindowManager to open real top-level windows, and what to ship instead if you need stable today.
- Fix: A RenderFlex overflowed by N pixels on the bottom when the keyboard opens in Flutter
The keyboard shrinks your Scaffold body's max height, so a Column that just fit now overflows. Wrap the body in a scrollable instead of turning resizeToAvoidBottomInset off.
2026 / 07
- Fix: CocoaPods could not find compatible versions for pod during a Flutter iOS build
Read the second line of the error, not the first. It names the cause: a stale Podfile.lock snapshot, a deployment target that is too low, or two plugins pinning the same transitive pod.
- Fix: Gradle task assembleDebug failed with exit code 1 in a Flutter Android build
That line is a wrapper, not the error. Re-run with flutter run --verbose or ./gradlew assembleDebug --stacktrace, read the real Gradle failure, then fix that.
- Fix: Unable to load asset in Flutter after adding an image to pubspec.yaml
The asset key is missing from the compiled bundle, not from your disk. Fix the pubspec indentation, add the trailing slash, match the key exactly, then full restart.
- How to build a Flutter web app with WebAssembly using flutter build web --wasm
A complete guide to shipping a Flutter web app compiled to WebAssembly on Flutter 3.44: what the two emitted builds look like, why Firefox and Safari still get JavaScript because of the loader's wasmAllowList, migrating off dart:html for dart2wasm, the COOP/COEP headers that decide whether skwasm runs multi-threaded, and how to prove at runtime which build the browser actually loaded.
- Migrate a setState StatefulWidget to a Riverpod Notifier in Flutter
A step-by-step move from widget-local setState to a Riverpod 3.x Notifier: classify what actually leaves the widget, write the Notifier, convert to ConsumerWidget, and survive the == filtering, build() re-entry, and autoDispose defaults that bite setState refugees. Tested on Flutter 3.44, Dart 3.x, flutter_riverpod 3.3.2.
- riverpod vs flutter_riverpod vs hooks_riverpod: which package do I actually need?
Install flutter_riverpod for almost every Flutter app. Use riverpod only for Dart-only code, and hooks_riverpod only if you already use flutter_hooks.
- Fix: Riverpod 3.0 StreamProvider stops emitting because updates are filtered by ==
In Riverpod 3.0 every provider filters listener notifications with ==, not identity. A StreamProvider that re-emits the same mutable object stops rebuilding the UI after the first frame. Here is why it happens and three ways to fix it. Tested on flutter_riverpod 3.3.2, Flutter 3.44, Dart 3.x.
- How to disable Riverpod 3.0's automatic provider retry
Riverpod 3.0 retries a failed provider up to 10 times by default. Pass a retry function that returns null on ProviderScope, ProviderContainer, or an individual provider to turn it off or bound it.
- Fix: ScaffoldMessenger.of() was called with a context that does not contain a Scaffold (Flutter)
This error means the BuildContext you passed is above the Scaffold or ScaffoldMessenger, not below it. Wrap the caller in a Builder, extract it into its own widget, or use a GlobalKey.
- Fix: type 'Null' is not a subtype of type 'X' in Dart
This runtime error means a null reached a cast expecting a non-nullable type, almost always from JSON. Make the field nullable, or supply a default before the cast runs.
- How to add a Hero animation between two screens in Flutter
Wrap the same widget on both routes in a Hero with an identical tag and Flutter animates its position and size across the navigation. Full guide: images, flightShuttleBuilder, createRectTween, RectTween arcs, gesture transitions, and the tag collisions that break it. Tested on Flutter 3.44, Dart 3.12.
- How to cancel a StreamSubscription in dispose to avoid a setState-after-dispose crash in Flutter
A stream keeps emitting after the user leaves the screen, its onData calls setState on a disposed State, and Flutter throws. Store the subscription, cancel it in dispose before super.dispose, and the callback can never fire on a dead widget. The full pattern for Flutter 3.44.
- How to guard setState with the mounted check after an async gap in Flutter
After an await, the widget may already be disposed, and calling setState throws. Guard the resume with if (!mounted) return; and, better, cancel the work that triggers it. The full pattern for Flutter 3.44.
- Migrate from Riverpod 2.x to Riverpod 3.0 in Flutter
A step-by-step upgrade from flutter_riverpod 2.x to 3.x: bump the packages, move StateProvider and friends to the legacy import, drop the AutoDispose and Family ref types, handle ProviderException wrapping and automatic retry, and fix the == notification filtering that silently drops StreamProvider events. Tested on Flutter 3.44, Dart 3.x, flutter_riverpod 3.3.2.
- Flutter 3.44: Read the Physical Screen Corner Radius from MediaQuery
Flutter 3.44 exposes the device's rounded display corners through MediaQuery.displayCornerRadiiOf. Stop guessing a magic radius and clip your UI to the exact hardware curve on Android API 31+.
- go_router vs auto_route vs Navigator 2.0 in Flutter
go_router and auto_route both sit on top of Navigator 2.0, so the real choice is declarative URL routing vs code-generated typed routes vs hand-rolling the Router API. A decision matrix with config for each, and when raw Navigator still wins.
- shrinkWrap vs Expanded vs slivers for long lists in Flutter: which should you pick?
For a long list, never use shrinkWrap. Use Expanded when the list is the only scrollable, and slivers (CustomScrollView) when it shares a scroll with other sections. Here is why, with a build-count benchmark.
- Fix: Riverpod 3.0 throws ProviderException instead of the original error
Riverpod 3.0 wraps errors thrown while reading a provider in a ProviderException. Catch that type and read e.exception to get your original error back, or use AsyncValue.error which is unwrapped.
- Dot Shorthands in Dart 3.12: Drop the Type Name in Flutter Code
Dot shorthands went stable in Dart 3.12.2. Write .center or .new and let the compiler infer the type from context. Here is how they work across enums, static members, and constructors.
- Fix: Cannot provide both a color and a decoration in a Flutter Container
Move the color inside the decoration: use decoration: BoxDecoration(color: ...) instead of passing both color and decoration to the same Container.
- Fix: Incorrect use of ParentDataWidget. Expanded widgets must be placed inside Flex widgets (Flutter)
This error means an Expanded or Flexible is not a direct child of a Row, Column, or Flex. Move it directly under the flex widget, or drop Expanded if the parent is not a flex.
- Fix: A RenderViewport expected a child of type RenderSliver but received a child of type RenderBox (Flutter CustomScrollView)
The slivers list of a CustomScrollView only accepts slivers. Wrap box widgets in SliverToBoxAdapter, or swap ListView/Padding/Column for SliverList and SliverPadding.
- How to Check Ref.mounted After an Async Gap in Flutter Riverpod 3
In a Notifier, resolve dependencies before the await, then guard the state write with if (!ref.mounted) return. This is the Riverpod 3.0 replacement for the old onDispose mixin, and it stops UnmountedRefException when a provider is disposed mid-await. Tested on flutter_riverpod 3.x, Flutter 3.44, Dart 3.x.
- How to mix a ListView and a GridView in one scroll view with slivers in Flutter
Put a list and a grid in a single continuous scroll without nested scrollables. Use CustomScrollView with SliverList and SliverGrid, and skip the shrinkWrap trap that quietly kills performance.
- How to nest a ListView inside a Column in Flutter without an unbounded-height error
Why a ListView in a Column throws 'Vertical viewport was given unbounded height', and the four fixes (Expanded, Flexible, shrinkWrap, SizedBox) with the performance trade-offs that decide which one you want.
2026 / 06
- Fix: LateInitializationError: Field '...' has not been initialized in Flutter
This crash means you read a late field before anything assigned it. Initialize it synchronously in initState, or stop using late and model the async value as nullable state.
- Fix: Null check operator used on a null value in Flutter
The ! operator hit a null at runtime. Replace it with ?. and ?? for a safe default, or guard with an explicit null check, instead of asserting a value that was not there.
- How to set up nested routes and deep links with go_router in Flutter
Build a persistent shell with nested routes using ShellRoute and StatefulShellRoute, then wire up path-based deep links that rebuild the full page stack. Full config for Android and iOS, plus the gotchas that break the back stack.
- How to use BuildContext safely after an await in Flutter
Capture what you need from the context before the await, then guard the resume with if (context.mounted) return. Here is the full pattern, the lint that enforces it, and the edge cases it misses.
- Migrate from FutureBuilder to a Riverpod AsyncNotifier in Flutter (flutter_riverpod 3.3.2)
A step-by-step migration from an inline FutureBuilder widget to a Riverpod AsyncNotifier in a real Flutter app: move the async work out of build, expose it as a provider, render with .when() or switch pattern matching, and add refresh and mutation methods. Tested on Flutter 3.44, Dart 3.x, flutter_riverpod 3.3.2.
- Migrate a Flutter 2 app to Flutter 3.x: the null safety checklist
A version-pinned guide to moving a legacy Flutter 2.x app to a current Flutter 3.x release, with the sound null safety migration as the hard gate: why you need a two-hop path through Dart 2.19, what dart migrate does, and what breaks along the way.
- Migrate from provider to Riverpod in Flutter (provider 6.1.5 to Riverpod 3.x)
A step-by-step migration from the provider package to Riverpod 3.x in a real Flutter app: ChangeNotifierProvider to Notifier, MultiProvider to ProviderScope, context.watch to ref.watch, ProxyProvider to ref.watch composition, plus the equality and lifecycle gotchas that bite. Tested on Flutter 3.27.1, Dart 3.11, provider 6.1.5, flutter_riverpod 3.3.1.
- FutureBuilder/StreamBuilder vs Riverpod AsyncValue in Flutter: which should you use?
Use FutureBuilder or StreamBuilder for a self-contained, throwaway async widget. Reach for Riverpod AsyncValue once the result is shared, cached, or mutated. Here is the decision, the gotchas, and runnable code for both. Tested on Flutter 3.44 and flutter_riverpod 3.3.1.
- Fix: Bad state: Cannot use "ref" after the widget was disposed in Flutter Riverpod
This crash means a WidgetRef was used after its widget left the tree, usually in an async callback. Read what you need before the await, then guard with a mounted check.
- Fix: Looking up a deactivated widget's ancestor is unsafe in Flutter
This crash means you called context.of() after the widget left the tree, usually in an async callback or dispose(). Capture the value before the await, or in didChangeDependencies().
- How to Initialize a Future So FutureBuilder Doesn't Recreate It on Every Rebuild in Flutter
FutureBuilder re-runs your async work every time the parent rebuilds because you created the Future inside build. Hoist it into State.initState (or memoize it), and FutureBuilder will reuse the same Future. Here is the why, the repro, and every variant that bites.
- Dart 3.12 Ships Primary Constructors Behind an Experiment Flag
Dart 3.12 adds an experimental primary constructors syntax that declares fields and a constructor in the class header, collapsing the classic three-line data class to one.
- Provider vs Riverpod vs Bloc for Flutter state management in 2026
Pick Riverpod for most new Flutter apps in 2026. Choose Bloc for large teams that want an enforced event-driven structure, and keep Provider only for legacy code.
- Fix: RenderBox was not laid out in Flutter
RenderBox was not laid out is almost always a secondary error. Find the first layout assertion above it, usually a scrollable given unbounded constraints, and fix that.
- Fix: A TextEditingController was used after being disposed in Flutter
This crash means code touched a controller after dispose() ran. Guard async callbacks with a mounted check, and never dispose a controller you do not own.
- Fix: setState() or markNeedsBuild() called during build in Flutter
This error means you mutated state while Flutter was building. Move the setState out of build, or defer it with addPostFrameCallback. Here is why it happens and the right fix.
- How to Show Loading and Error States with AsyncValue in Flutter Riverpod
Render loading, data, and error UI from a single AsyncValue in Riverpod 3. Use AsyncNotifier and AsyncValue.guard for mutations, .when() and switch pattern matching for the UI, keep previous data on refresh, and migrate the legacy StateNotifier pattern. Tested on flutter_riverpod 3.x, Flutter 3.44, Dart 3.x.
- How to Dispose Controllers in Flutter to Avoid Memory Leaks
AnimationController, TextEditingController, and ScrollController hold resources that Dart's GC cannot reclaim until you dispose them. Here is the correct pattern, the ordering rules, and how to catch leaks before they ship.
- How to Handle Network Errors Gracefully in a Flutter App
A request can fail with no connectivity, a timeout, a DNS failure, a 500, or malformed JSON, and each needs a different response. Here is how to catch the right exceptions, classify them, retry safely, and show a UI a user can act on.
2026 / 05
- The Dart and Flutter MCP server: one command to give Claude Code your running Flutter app
Dart 3.12 ships dart mcp-server, the official MCP bridge into the Dart and Flutter toolchain. Register it once in Claude Code, Cursor, or Codex CLI and your agent gets hot reload, pub.dev search, and live widget introspection without copy-pasting a DTD URI.
- Dart records vs Freezed classes: which should you pick in 2026?
Pick Dart 3.12 records for ephemeral, locally-shaped data with no methods, and Freezed 3.x classes for named domain models that need copyWith, sealed unions, JSON serialization, or any behaviour.
- Flutter vs React Native vs .NET MAUI: which should you pick for a new mobile project in 2026?
For a greenfield mobile app in 2026, pick Flutter 3.44 when pixel-identical UI and animation budget matter, React Native 0.82 when your team already lives in TypeScript and you need a real browser sibling, and .NET MAUI 11 when iOS and Android are part of a wider .NET product and you need first-party Microsoft support.
- Dart 3.12 Drops the Initializer List for Private Fields
Dart 3.12 lets constructors initialize private fields directly with named parameters, killing one of the language's most persistent boilerplate patterns.
- Cloud Functions for Firebase Now Speaks Dart (Experimental)
Firebase shipped experimental Dart support for Cloud Functions on May 6, 2026. HTTPS and callable triggers, AOT-compiled cold starts, and the Firebase CLI handles compilation.
- Fix: AndroidX conflict during Flutter Android build
The fix in 30 seconds: set android.useAndroidX=true and android.enableJetifier=true in android/gradle.properties, then find any plugin still on the old support library and upgrade or replace it.
- Fix: Flutter background_fetch plugin requires minSdkVersion 21
The fix in 30 seconds: set minSdkVersion to 21 (or higher) in android/app/build.gradle. background_fetch is built on Android's JobScheduler, which only exists from API 21.
- Fix: Failed to build iOS app with Xcode 16 and Flutter 3.x
The fix in 60 seconds: upgrade Flutter to 3.24.4 or later, raise the Podfile platform to iOS 13, wipe Pods plus DerivedData, then pod install. The error rarely lives in your Dart code.
- Fix: Unhandled Exception: FormatException: Unexpected character when parsing JSON in Dart
The fix in 30 seconds: your response body is not the JSON you think it is. Print the raw bytes, decode with utf8.decode(response.bodyBytes), and never feed an HTML error page or a BOM-prefixed string to jsonDecode.
- Fix: Version solving failed in pubspec.yaml
The fix in 30 seconds: read the 'because' chain in the error, find the one constraint that boxes pub in, and either widen it or add a dependency_overrides entry. Do not start with flutter clean.
- Fix: A RenderFlex overflowed by N pixels in Flutter
The fix in 30 seconds: wrap the offending child in Expanded or Flexible. Then read the rest to learn why Row and Column do not clip, what unbounded constraints actually mean, and which fix is right for each layout.
- Flutter 3.44 Splits Material and Cupertino Out of the SDK and Defaults to SwiftPM
Flutter 3.44 stable freezes Material and Cupertino inside the SDK and points new work at the material_ui and cupertino_ui packages on pub.dev. SwiftPM also becomes the default for iOS and macOS, finally retiring CocoaPods.
- How to migrate a Flutter app from GetX to Riverpod
Step-by-step migration from GetX to Riverpod 3.x in a real Flutter app: GetxController to Notifier, .obs to derived providers, Get.find to ref.watch, Get.to to go_router, plus snackbars, theming, and tests. Tested on Flutter 3.27.1, Dart 3.11, flutter_riverpod 3.3.1.
- How to profile jank in a Flutter app with DevTools
Step-by-step guide to finding and fixing jank in Flutter 3.27 with DevTools: profile mode, the Performance overlay, the Frame Analysis tab, the CPU Profiler, raster vs UI thread, shader warm-up, and Impeller-specific gotchas. Tested on Flutter 3.27.1, Dart 3.11, DevTools 2.40.
- How to set the accent color in a Flutter app with Material 3 ColorScheme
The 2026 way to set an accent color in Flutter with Material 3: ColorScheme.fromSeed, the colorSchemeSeed shorthand, the seven DynamicSchemeVariant options, dark mode, dynamic_color on Android 12+, and harmonizing brand colors. Tested on Flutter 3.27.1 and Dart 3.11.
- How to add platform-specific code in Flutter without plugins
Call native Android (Kotlin) and iOS (Swift) code from a Flutter 3.x app without writing a plugin: MethodChannel, EventChannel, BasicMessageChannel, the StandardMessageCodec type table, threading rules, and the cases where a plugin still wins.
- How to write a Dart isolate for CPU-bound work
When async/await is not enough: spawn a Dart isolate to run CPU-bound work off the UI thread. Isolate.run, Flutter's compute, long-lived workers with SendPort/ReceivePort, what can cross the boundary, and the JS/web caveat. Tested on Dart 3.11 and Flutter 3.27.1.
- How to target multiple Flutter versions from one CI pipeline
Practical guide to running one Flutter project against multiple SDK versions in CI: a GitHub Actions matrix with subosito/flutter-action v2, FVM 3 .fvmrc as the source of truth, channel pinning, caching, and the gotchas that bite when the matrix grows past three versions.
2026 / 04
- Fluorite: Toyota Built a Console-Grade Game Engine on Flutter and Dart
Fluorite is an open-source 3D game engine that embeds Google Filament rendering inside Flutter widgets and lets you write game logic in Dart.
2026 / 02
- Flutter: Droido 1.2.0 is a debug-only network inspector with zero release impact
Droido 1.2.0 landed on Feb 8, 2026 as a debug-only network inspector for Flutter. The interesting part is not the UI. It is the packaging story: keep a modern inspector in debug builds while ensuring release builds remain clean, small, and unaffected.
- biometric_signature 10.0.0: `simplePrompt()` is the feature, new `BiometricError` values are the real breaking change (Flutter 3.x)
biometric_signature 10.0.0 adds simplePrompt() and new BiometricError values. Here is how to handle the breaking change and future-proof your Flutter 3.x auth flows.
- TrailBase v0.23.7: A Single-Binary Firebase Alternative for .NET 10 and Flutter
TrailBase is an open-source, single-executable backend built on Rust, SQLite, and Wasmtime. Version 0.23.7 ships UI fixes and improved error handling.
2026 / 01
- Debugging Flutter iOS from Windows: a real device workflow (Flutter 3.x)
A pragmatic workflow for debugging Flutter iOS apps from Windows: offload the build to macOS in GitHub Actions, install the IPA on a real iPhone, and use flutter attach for hot reload and DevTools.
- Flutter Particles 2.0.2: a quick tour (and a tiny integration snippet) on Flutter 3.x
particles_flutter 2.0.2 adds particle shapes, rotation, boundary modes, and emitters. A quick tour of what changed and a tiny integration snippet for Flutter 3.x projects.
- Flutter Text: the `leadingDistribution` detail that changes how your UI “breathes”
The leadingDistribution property in Flutter's TextHeightBehavior controls how extra leading is distributed above and below glyphs. Here is when it matters and how to fix text that looks vertically off.
- TypeMonkey is a good reminder: Flutter desktop apps need architecture first, polish later
TypeMonkey, a Flutter desktop typing app, shows why desktop projects need clean architecture from day one: sealed states, interface boundaries, and testable logic.
- Dart 3.12 dev tags are moving fast: How to read them (and what to do) as a Flutter 3.x developer
Dart 3.12 dev tags are landing fast. Here is how to read the version string, pin a dev SDK in CI, and triage failures so your Flutter 3.x migration is a small PR instead of a fire drill.
- Flet in 2026: Flutter UI, Python logic, and the trade-offs you need to admit upfront
Flet lets you build Flutter UIs with Python logic. Here are the real trade-offs: latency from event chatter, ecosystem mismatch with Dart plugins, and split-brain debugging -- plus when it actually makes sense.
- Flutter 3.x gets a new “offline RAG” building block: `mobile_rag_engine` (Rust core)
mobile_rag_engine brings on-device RAG to Flutter with a Rust core, ONNX embeddings, HNSW vector search, and SQLite storage. A practical look at the API, integration flow, and shipping constraints.
- FlutterGuard CLI: A Fast “What Can an Attacker Extract?” Check for Flutter 3.x Apps
FlutterGuard CLI scans your Flutter 3.x build artifacts for leaked secrets, debug symbols, and metadata. A practical workflow for integrating it into CI and handling what it finds.
- Flutter 3.38.6 and the `engine.version` Bump: Reproducible Builds Get Easier (If You Pin It)
Flutter 3.38.6 bumped engine.version, and that matters for reproducible builds. Learn how to pin the SDK in CI, avoid engine drift, and diagnose 'what changed' when builds break with no code changes.
- Flutter 3.x routing: tp_router tries to delete your route table (and it’s a compelling idea)
tp_router is a generator-driven Flutter router that eliminates manual route tables. Annotate your pages, run build_runner, and navigate with typed APIs instead of stringly-typed paths.
2023 / 10
- How to fix: MissingPluginException – No implementation found for method getAll
Fix Flutter `MissingPluginException` 'No implementation found for method getAll' on shared_preferences and similar plugins (package_info_plus, etc.) — ProGuard, plugin registration, minSdkVersion, hot restart fixes.
- Flutter – NoSuchMethod: the method was called on null
This Flutter error occurs when calling a method on a null object reference. Learn how to diagnose and fix the NoSuchMethod error using the call stack and breakpoints.
2023 / 08
- Flutter – Fix The getter ‘accentColor’ isn’t defined for the class ‘ThemeData’
The most likely cause of this error is an update to Flutter (flutter upgrade) which led to some incompatibility with your existing code or your project's dependencies. The Theme.of(context).accentColor property has been deprecated since Flutter 1.17 and is entirely removed from the current version, thus the error you are seeing. What to use instead Or, if…
- Flutter: Your project requires a newer version of the Kotlin Gradle plugin
Fix the Flutter error 'Your project requires a newer version of the Kotlin Gradle plugin' by updating the ext.kotlin_version in your build.gradle file to the latest Kotlin release.