Catalog / Flutter Cheat Sheet
Flutter Cheat Sheet
A comprehensive cheat sheet for Flutter development, covering widgets, layouts, state management, navigation, and more.
Core Widgets
Basic Widgets
|
Displays a string of text.
|
|
Displays an image from various sources.
|
|
Displays an icon from the built-in icon set.
|
|
A button that elevates when pressed.
|
|
A simple button without elevation.
|
|
A button with an icon.
|
Layout Widgets
|
A widget for applying padding, margin, borders, background color, and more.
|
|
Arranges children in a horizontal line.
|
|
Arranges children in a vertical line.
|
|
Overlays children on top of each other.
|
|
Centers its child within itself.
|
|
Adds space around its child.
|
State Management
StatelessWidget
A widget that does not require mutable state.
|
StatefulWidget
A widget that has mutable state which can change during the lifetime of the widget.
|
setState
A method to trigger UI updates in a StatefulWidget.
|
Provider
Overview |
A popular package for state management, using inherited widgets and dependency injection. |
Usage |
|
Bloc/Cubit
Overview |
Libraries for managing state using reactive programming principles. |
Usage |
|
Riverpod
Overview |
A reactive caching and data-fetching system. It simplifies accessing network requests with zero boilerplate. |
Usage |
|
Navigation & Routing
Basic Navigation
|
Pushes a new route onto the navigator’s stack.
|
|
Pops the current route off the navigator’s stack.
|
|
A route that transitions to the next screen using a platform-specific animation.
|
Named Routes
Defining Routes |
Define routes in
|
Navigating to Named Routes |
Navigate using
|
Passing Data to Routes
Pass data via route arguments.
|
Returning Data from Routes
Return data using
|
Asynchronous Operations
Future
Definition |
Represents a value that will be available at some time in the future. |
Usage |
|
Handling Future |
|
async/await
Definition |
Syntactic sugar for working with Futures in a more readable way. |
Usage |
|
Stream
Definition |
A sequence of asynchronous events. |
Usage |
|
Listening to Stream |
|
FutureBuilder
Definition |
A widget that builds itself based on the latest snapshot of interaction with a Future. |
Usage |
|
StreamBuilder
Definition |
A widget that builds itself based on the latest snapshot of interaction with a Stream. |
Usage |
|