Cookbook _ Flutter
Cookbook _ Flutter
Learn more
Cookbook
Cookbook
Contents keyboard_arrow_down
Animation
Design
Effects
more_horiz
This cookbook contains recipes that demonstrate how to solve common problems while
writing Flutter apps. Each recipe is self-contained and can be used as a reference to help
you build up an application.
Animation
Animate a page route transition
Animate a widget using a physics simulation
Animate the properties of a container
Fade a widget in and out
Design
Add a drawer to a screen
Display a snackbar
Export fonts from a package
Update the UI based on orientation
Use a custom font
Use themes to share colors and font styles
Work with tabs
Effects
Create a download button
Create a nested navigation flow
Create a scrolling parallax effect
Create a shimmer loading effect
Create a staggered menu animation
Create a typing indicator
Create an expandable FAB
Create gradient chat bubbles
Drag a UI element
Forms
Build a form with validation
Create and style a text field
Focus and text fields
Handle changes to a text field
Retrieve the value of a text field
Games
Add achievements and leaderboards to your mobile game
Add multiplayer support via Firestore
Add ads to your mobile Flutter app or game
Gestures
Add Material touch ripples
Handle taps
Implement swipe to dismiss
Images
Display images from the internet
Fade in images with a placeholder
Lists
Create a grid list
Create a horizontal list
Create lists with different types of items
Place a floating app bar above a list
Use lists
Work with long lists
Create a list with spaced items
Maintenance
Report errors to a service
Navigation
Animate a widget across screens
Navigate to a new screen and back
Navigate with named routes
Pass arguments to a named route
Set up app links for Android
Set up universal links for iOS
Return data from a screen
Send data to a new screen
Networking
Fetch data from the internet
Make authenticated requests
Send data to the internet
Update data over the internet
Delete data on the internet
Communicate with WebSockets
Parse JSON in the background
Persistence
Persist data with SQLite
Read and write files
Store key-value data on disk
Plugins
Play and pause a video
Add ads to your mobile Flutter app or game
Take a picture using the camera
Testing
Integration
An introduction to integration testing
Performance profiling
Unit
An introduction to unit testing
Mock dependencies using Mockito
Widget
An introduction to widget testing
Find widgets
Handle scrolling
Test the orientation of an app
Tap, drag, and enter text
Except as otherwise noted, this site is licensed under a Creative Commons Attribution 4.0 International
License, and code samples are licensed under the 3-Clause BSD License.