
Model-View-Controller (MVC): Separating App Logic from UI
MVC organizes code by separating data (Model) from the user interface (View), using a Controller as the go-between. This is the foundational pattern for many UI frameworks, like Cocoa and UIKit. The main footgun is the "Massive View Controller."

The UIViewController Lifecycle: From Creation to On-Screen
Think of a UIViewController as an actor with cues to enter, perform, and exit. Its lifecycle methods are your script for setting up data, updating the UI, and cleaning up resources.

Auto Layout: Describing Relationships, Not Frames
Auto Layout lets you describe a UI by its relationships, not hardcoded coordinates. You declare "this button is centered and 8 points below the logo," and the system calculates its position.

StateNotifierProvider: Manage Immutable State
StateNotifierProvider bundles immutable state with the logic to change it. It's ideal for managing complex objects like a todo list by exposing methods like `addTodo`.

Flutter Flavors: One Codebase, Multiple App Versions
Flutter Flavors let you build multiple app versions from one codebase, like a kitchen making different dishes from the same ingredients. Use them to manage separate API endpoints and branding for dev, staging, and prod.

Drift: Type-Safe SQL in Dart & Flutter
Drift gives your raw SQL queries compile-time safety. Instead of parsing maps, its build-time analyzer validates your SQL and generates typed Dart objects for results. Use it to write complex queries without risking runtime errors from typos or schema changes.

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`.
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.

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.

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.

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.

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'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'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.

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…

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.

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 `!`.

Higher-Order Functions: Passing Code as Data
Higher-order functions treat code as data, accepting other functions as arguments. Lambdas are a concise syntax for creating these function arguments inline, powering collection operations like `map` and `filter` or UI listeners.

Android Navigation Graph: A Map for Your UI
Think of the Navigation Graph as a visual map of your app's screens. It centralizes all navigation logic in one XML file, defining destinations (screens) and actions (paths between them), simplifying transitions and deep linking.

ViewBinding: Say Goodbye to findViewById
ViewBinding generates a type-safe class from your XML layout, giving you direct, non-null access to views with IDs. It's a compile-time safe replacement for `findViewById` used in Activities and Fragments. If a view is missing, you forgot to give it an ID.