tezvyn:

Flutter & Dart

Flutter framework, Dart language, packages, Impeller

33 bites

Flutter & Dart30 sec read

MobX: Automatic UI Updates with Reactive State

MobX automatically wires your reactive data to your Flutter UI, so widgets update when data changes. It's used for state management from simple counters to complex forms. The main footgun is forgetting to wrap all state mutations inside an `Action`.

Flutter & Dart30 sec read

GetX State Management: Simplicity Over Boilerplate

GetX simplifies Flutter state management by removing boilerplate and avoiding code generators. It offers both simple manual updates and a reactive style. Use it for rapid development where minimal setup is key.

Flutter & Dart30 sec read

Riverpod: Compile-Safe, Reactive State Management

Riverpod treats app state like a reactive formula. Define a piece of data once, and Riverpod automatically updates any UI that depends on it. It's ideal for network requests and shared state. Footgun: Watching a provider rebuilds the UI on every change.

Flutter & Dart30 sec read

Cubit: Simple State Management in Flutter

A Cubit is a simple state manager that exposes functions to directly trigger state changes. It's ideal for managing local UI state, like a counter or form data, without the complexity of events. The footgun is expecting state to update synchronously.

Flutter & Dart32 sec read

InkWell: Adding Material Splash Effects

InkWell adds a Material Design 'splash' effect to any widget on tap. Think of it as ink spreading inside the surface you touch. Use it to make non-interactive widgets like images respond to taps. The splash won't appear if an opaque widget is between it.

Flutter & Dart30 sec read

MediaQuery: Reading Device Properties Efficiently

MediaQuery is your widget's window to the device, providing screen size, orientation, and safe areas. Use it to build responsive UIs that avoid system elements like notches or the keyboard. The footgun: `MediaQuery.of(context)` rebuilds on any change.

Flutter & Dart30 sec read

Flutter's Container: The Ultimate Box Widget

Think of Container as a customizable box for your UI. It's Flutter's multi-tool for combining layout, styling, and positioning in a single widget. Use it to add padding, margins, borders, or background colors.

Flutter & Dart30 sec read

Flutter's Stack: Layering Widgets on Top of Each Other

Flutter's Stack widget lets you overlap children, like layering papers. The first child is at the bottom, the last is on top. Use it for text over images or gradient overlays. The footgun: you can only position children relative to the stack's edges.

Flutter & Dart33 sec read

Row and Column: Arranging Widgets Without Scrolling

Think of Row and Column as rigid containers for laying out widgets horizontally or vertically. Use them for simple, fixed layouts like button bars. The footgun: unbounded children like Text will overflow; wrap them in an Expanded widget to fill remaining…

Flutter & Dart30 sec read

Dart's Microtask Queue vs. Event Queue

Dart's event loop prioritizes a 'microtask' queue for immediate async tasks over the main 'event' queue for I/O and user input. This ensures high-priority code runs first, but risks starving the event queue and freezing the UI if overused.

Flutter & Dart30 sec read

Dart's Null-Aware Operators: Safely Handle Nulls

Null-aware operators let you work with potentially null values without a cascade of `if (x != null)` checks. Use them to access properties, provide defaults, or assign values only when a variable is null. The footgun is confusing safe `?.` with unsafe `!`.

Flutter & Dart30 sec read

Riverpod 3 brings code-gen to every provider

Riverpod 3 standardises on the @riverpod annotation. The legacy StateProvider / ChangeNotifierProvider APIs are deprecated, and the runtime gets a 30% smaller binary footprint thanks to removing the manual scoping machinery.

Flutter & Dart30 sec read

Flutter 3.27 ships impeller on Android by default

The new release flips the Impeller renderer on for all Android devices, dropping Skia for Vulkan/OpenGL. Smoother scrolling, faster first frame, and far fewer jank reports — at the cost of a slightly larger APK.