Cookbook | Flutterdocs.flutter.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic. .OK, got it Flutter Docs routinelight_mode Lightdark_mode Darknight_sight_auto AutomaticappsGet started menu closeGet startedSet up FlutterInstall Flutter expand_moreOverviewInstall with VS CodeInstall manuallyUpgrade SDKSDK archiveAdd to pathTroubleshootUninstall SDKLearn Flutter expand_moreIntroductionWrite your first appLearn the fundamentals expand_moreIntroductionIntro to DartWidgetsLayoutState managementHandling user inputNetworking and dataLocal data and cachingFrom another platform? expand_moreFlutter for Android devsFlutter for Jetpack Compose devsFlutter for SwiftUI devsFlutter for UIKit devsFlutter for React Native devsFlutter for web devsFlutter for Xamarin.Forms devsIntroduction to declarative UIFlutter versus Swift concurrencySamples & tutorialsStay up to date expand_moreRelease notesBreaking changesCompatibility policyMedium publicationopen_in_newWhat's new in the docsApp solutions expand_moreCreate with AI expand_moreAI Toolkit expand_moreOverviewUser experienceFeature integrationCustom LLM providersChat client sampleVertex AI in Firebaseopen_in_newDevelop with Firebase expand_moreOverviewDiscover Firebase for Flutteropen_in_newGet to know Firebase for Flutteropen_in_newAdd a user authentication flow to a Flutter app using FirebaseUIopen_in_newGet to know Firebase for webopen_in_newBuild multi-platform games expand_moreOverviewAdd achievements and leaderboardsBuild leaderboards with Firestoreopen_in_newAdd advertisingAdd multiplayer supportAdd in-app purchasesopen_in_newAdd user authenticationopen_in_newDebug using Crashlyticsopen_in_newIntro to Flame with Flutteropen_in_newMonetize your app expand_moreIntegrate ads expand_moreAds overviewAdd advertisingAdd AdMob ads to your Flutter appopen_in_newAdd an AdMob banner and native inline adsopen_in_newIntegrate multimedia ads (video)open_in_newGoogle AdMob mediationopen_in_newInteractive Media Ads SDKopen_in_newSupport payments expand_morePayments overviewGoogle pay packageopen_in_newAdd in-app purchasesopen_in_newIntegrate maps expand_moreAdd Google maps to a Flutter appopen_in_newGoogle Maps packageopen_in_newBuild a news appUser interfaceIntroductionWidget catalogLayout expand_moreIntroductionBuild a layoutLists & grids expand_moreCreate and use listsCreate a horizontal listCreate a grid viewCreate lists with different types of itemsCreate lists with spaced itemsWork with long listsScrolling expand_moreOverviewUse slivers to achieve fancy scrollingPlace a floating app bar above a listCreate a scrolling parallax effectAdaptive & responsive design expand_moreOverviewGeneral approachSafeArea & MediaQueryLarge screens & foldablesUser input & accessibilityCapabilities & policiesAutomatic platform adaptationsBest practicesAdditional resourcesDesign & theming expand_moreShare styles with themesMaterial designMigrate to Material 3Text expand_moreFonts & typographyUse a custom fontExport fonts from a packageGoogle Fonts packageopen_in_newCustom graphics expand_moreUse custom fragment shadersInteractivity expand_moreAdd interactivity to your appGestures expand_moreIntroductionHandle tapsDrag an object outside an appDrag a UI element within an appAdd Material touch ripplesImplement swipe to dismissInput & forms expand_moreCreate and style a text fieldRetrieve the value of a text fieldHandle changes to a text fieldManage focus in text fieldsBuild a form with validationDisplay a snackbarImplement actions & shortcutsManage keyboard focusAssets & media expand_moreAdd assets and imagesDisplay images from the internetFade in images with a placeholderPlay and pause a videoTransform assets at build timeNavigation & routing expand_moreOverviewAdd tabs to your appNavigate to a new screen and backSend data to a new screenReturn data from a screenAdd a drawer to a screenSet up deep linkingSet up app links for AndroidSet up universal links for iOSConfigure web URL strategiesAnimations & transitions expand_moreIntroductionTutorialImplicit animationsAnimate the properties of a containerFade a widget in and outHero animationsAnimate a page route transitionAnimate using a physics simulationStaggered animationsCreate a staggered menu animationAPI overviewAccessibility & internationalization expand_moreAccessibilityInternationalizationBeyond UIData & backend expand_moreState management expand_moreIntroductionThink declarativelyEphemeral vs app stateSimple app state managementOptionsNetworking & http expand_moreOverviewFetch data from the internetMake authenticated requestsSend data to the internetUpdate data over the internetDelete data on the internetCommunicate with WebSocketsSerialization expand_moreJSON serializationParse JSON in the backgroundPersistence expand_moreStore key-value data on diskRead and write filesPersist data with SQLiteFirebase expand_moreOverviewAdd Firebase to your Flutter appopen_in_newGoogle APIsApp architecture expand_moreIntroductionArchitecture conceptsGuide to app architectureArchitecture case study expand_moreOverviewUI layerData layerDependency injectionTesting each layerRecommendationsDesign patternsPlatform integration expand_moreSupported platformsBuild desktop apps with FlutterWrite platform-specific codeAndroid expand_moreSet up Android developmentAdd a splash screenAdd predictive backBind to native codeHost a native Android viewCalling JetPack APIsLaunch a Jetpack Compose activityRestore state on AndroidTarget ChromeOS with AndroidiOS expand_moreSet up iOS developmentFlutter on latest iOSLeverage Apple's system librariesAdd a launch screenAdd iOS App Clip supportAdd iOS app extensionsBind to native codeHost a native iOS viewEnable debugging on iOSRestore state on iOSLinux expand_moreSet up Linux developmentBuild a Linux appmacOS expand_moreSet up macOS developmentBuild a macOS appBind to native codeHost a native macOS viewWeb expand_moreWeb support in FlutterSet up web developmentBuild a web appCompile to WebAssemblyCustomize app initializationAdd Flutter to any web appWeb content in FlutterWeb renderersDisplay images on the webWeb FAQWindows expand_moreSet up Windows developmentBuild a Windows appPackages & plugins expand_moreUse packages & pluginsDevelop packages & pluginsSwift Package Manager expand_moreFor app developersFor plugin authorsFlutter FavoritesPackage repositoryopen_in_newTesting & debugging expand_moreTestingOverviewUnit testing expand_moreIntroductionMock dependenciesWidget testing expand_moreIntroductionFind widgetsSimulate scrollingSimulate user interactionIntegration testing expand_moreIntroductionWrite and run an integration testProfile an integration testTest a pluginHandle plugin code in testsDebuggingDebugging toolsDebug your app programmaticallyUse a native language debuggerCommon Flutter errorsHandle errorsReport errors to a servicePerformance & optimization expand_moreOverviewImpellerPerformance best practicesApp sizeDeferred componentsRendering performancePerformance profilingPerformance profiling for webPerformance metricsConcurrency and isolatesPerformance FAQAppendixDeployment expand_moreObfuscate Dart codeCreate app flavors for AndroidCreate app flavors for iOS and macOSBuild and release an Android appBuild and release an iOS appBuild and release a macOS appBuild and release a Linux appBuild and release a Windows appBuild and release a web appSet up continuous deploymentAdd to an existing app expand_moreIntroductionAdd to an Android app expand_moreSet up Android projectAdd a single Flutter screenAdd a Flutter FragmentAdd a Flutter ViewUse a Flutter pluginAdd to an iOS app expand_moreSet up iOS projectAdd a single Flutter screenAdd to a web appDebug embedded Flutter moduleAdd multiple Flutter instancesLoading sequence and performanceTools & editors expand_moreAndroid Studio & IntelliJVisual Studio CodeDevTools expand_moreOverviewRun from Android Studio & IntelliJRun from VS CodeRun from command lineFlutter inspectorLegacy Flutter inspectorPerformance viewCPU Profiler viewMemory viewDebug console viewNetwork viewDebuggerLogging viewApp size toolDevTools extensionsValidate deep linksRelease notesFlutter Property EditorSDK overviewFlutter's pubspec optionsAutomated fixesCode formattingFlutter concepts expand_moreArchitectural overviewInside FlutterUnderstanding constraintsFlutter's build modesHot reloadResources expand_moreFAQBooksVideosCoursesLearn DartGet supportContribute expand_moreContribute to FlutterCreate useful bug reportsDiscover proposed featuresReference expand_moreWho is Dash?Widget indexCreate a new appflutter CLIAPI docsopen_in_new list On this page chevron_right Cookbook list On this pageCookbookThis 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#Design#Effects#Forms#Games#Gestures#Images#Lists#Maintenance#Navigation#Networking#Persistence#Plugins#Testing#Integration#Unit#Widget#Was this page's content helpful?thumb_up thumb_downThank you for your feedback!Thank you for your feedback! Please let us know what we can do to improve.Unless stated otherwise, the documentation on this site reflects the latest stable version of Flutter. Page last updated on 2025-06-30. or . Except as otherwise noted, this site is licensed under a , and code samples are licensed under the . , 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., Flutter is an open-source framework for building mobile, web, and desktop apps using the Dart language. With this recipe-based guide, which focuses on robust app design and core principles, you'll learn how to solve cross-platform development issues in a practical way..