Cheat Sheets

Flutter Widgets Cheat Sheet: Stateless, Stateful, Layout & Material

By ArpaNeuro Team September 25, 2026
Flutter widgets cheat sheet

Everything in Flutter is a widget: structure (Scaffold), layout (Row, Column, Stack), painting (Container, DecoratedBox), and Material/Cupertino controls. StatelessWidget for UI from constructor fields. StatefulWidget when the widget must change over time. Prefer ListView.builder over a Column of hundreds of children.

This Flutter cheat sheet is written for people searching for a fast, accurate reference: students, junior developers, and teams shipping production software. Pin it, copy the snippets, and come back when syntax slips.

Quick reference

  • Text / Icon: Display. Wrap text that should wrap with Flexible in a Row.
  • Row / Column: Main axis + mainAxisAlignment. Expanded takes leftover space.
  • Stack: Overlap children. Positioned for absolute corners.
  • Container: Convenience for padding, margin, color, constraints. Not the only layout tool.
  • ListView: ListView.builder for long lists. separatorBuilder for dividers.
  • Material: ElevatedButton, TextField, AppBar, SnackBar inside MaterialApp.
  • Keys: ValueKey(id) on list items so State is preserved correctly.
  • const: Mark widgets const when all args are const — fewer rebuilds.

Copy-paste examples

Column layout and a builder list

Unbounded height: a ListView inside a Column needs Expanded. Builders pass index.

Widget profile(String title, List<String> lines) {
  return Column(
    crossAxisAlignment: CrossAxisAlignment.start,
    children: [
      Text(title, style: const TextStyle(fontSize: 20, fontWeight: FontWeight.bold)),
      const SizedBox(height: 12),
      Expanded(
        child: ListView.builder(
          itemCount: lines.length,
          itemBuilder: (context, i) => ListTile(title: Text(lines[i])),
        ),
      ),
    ],
  );
}

Common mistakes

  • Column + ListView without Expanded — “Vertical viewport was given unbounded height.”
  • Using Container for every spacing instead of SizedBox/Padding.
  • Creating a new TextEditingController in build every frame (leaks and lost cursor).
  • Ignoring const constructors in hot paths of a large list.

FAQ

  1. Widget vs RenderObject? You write widgets. Flutter inflates an element tree and render objects for layout/paint. Debug with Flutter Inspector, not by subclassing render objects on day one.
  1. Material or Cupertino? Material is the default look. Cupertino mimics iOS. Many apps use Material on both platforms; some switch with Theme / platform checks.
  1. Can I use HTML widgets? No. Flutter is not the DOM. On Flutter web it still paints to a canvas/HTML combination — you write Dart widgets, not <div>.

Related Flutter cheat sheets

Build with this stack

When a cheat sheet is not enough — you need a production app, a student FYP, or a custom dashboard — ArpaNeuro builds mobile app development and also sells ready-made source code. Request a quote and tell us the stack.

Browse software development services or the source code marketplace if you want a working codebase instead of starting from a blank file.

← All Articles Get a Quote →