2026-07-05 errorsflutterdart 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.
2026-07-05 errorsflutterdart 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.
2026-07-05 errorsflutterdart 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.
2026-07-04 flutterdartriverpod 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.
2026-07-02 flutterdartlayout 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.
2026-07-02 flutterdartlayout 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-24 errorsflutterdart 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.
2026-06-24 errorsflutterdart 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.
2026-06-22 flutterdartgo-router 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.
2026-06-22 flutterdartasync 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.