Results for “Widget”
Full-text search across Boring Doc explanations, official documentation pages, the Flutter API index and every indexed version change.
Guides
- Layouts in Flutterdoc
build your app's layout. Overview Layouts in Flutter are built with widgets. Widgets are classes used to build UIs. Widgets are also used
- Add interactivity to your Flutter appdoc
implement a stateful widget that responds to taps. How to respond to taps. How to create a custom widget. The difference between stateless and stateful widgets
- Flutter architectural overviewdoc
A high-level overview of the architecture of Flutter, including the core
- Understanding Flutter's keyboard focus systemdoc
How to use the focus system in your Flutter app. This article
- An introduction to widget testingdoc
test() function. The Finder classes allow searching for widgets in the test environment. Widget-specific Matcher constants help verify whether a Finder locates a widget
- Create widgetsdoc
Learn about stateless widgets and how to build your own. Learn to create custom widgets and use the most common SDK widgets like Container, Center
- Understanding constraintsdoc
Flutter's model for widget constraints, sizing, positioning, and how they interact. you might check out [Common Flutter errors][]. When someone learning Flutter asks you why some
- Hero animationsdoc
animate a widget to fly between two screens. The hero refers to the widget that flies between screens. Create a hero animation using Flutter's Hero
- Layoutdoc
Learn about common layout widgets in Flutter. Learn how to build layouts with common widgets like Scaffold, AppBar, Column, and Row. Introduction Given that Flutter
- Find widgetsdoc
Finder classes for testing widgets. To locate widgets in a test environment, use the Finder classes. While it's possible to write your own Finder classes
- Common Flutter errorsdoc
How to recognize and resolve common Flutter framework errors. Introduction This page
- DevToolsdoc
Dart DevTools when developing Flutter apps. Learn to use the widget inspector and property editor to debug layout issues and experiment with properties in real-time. Introduction
- Simple app state managementdoc
separate screens: a catalog, and a cart (represented by the MyCatalog , and MyCart widgets, respectively). It could be a shopping app, but you can imagine the same
- Performance best practicesdoc
perceived performance with image placeholders, precaching, and disabled navigation transitions Building performant Flutter widgets How do you design a Flutter app to most efficiently render your scenes
- User inputdoc
buttons. Introduction The app will display the user's guesses in the Tile widgets, but it needs a way for the user to input those guesses
- Animations tutorialdoc
fundamental classes from the animation library to add animation to a widget. When to use AnimatedWidget vs. AnimatedBuilder . The examples build on each other, introducing
- Animate a widget across screensdoc
animate a widget from one screen to another It's often helpful to guide users through an app as they navigate from screen to screen. A common
- Stateful widgetsdoc
Learn about StatefulWidgets and rebuilding Flutter UI. Learn when widgets need to be stateful and how to trigger UI updates with setState. Introduction So far, your
- Animate a widget using a physics simulationdoc
interactions feel realistic and interactive. For example, you might want to animate a widget to act as if it were attached to a spring or falling with
- Testing Flutter appsdoc
categories: A unit test tests a single function, method, or class. A widget test (in other UI frameworks referred to as component test ) tests a single widget
- Tap, drag, and enter textdoc
simulate them in the test environment. For this purpose, use the WidgetTester library. The WidgetTester provides methods for entering text, tapping, and dragging. enterText() tap() drag() In many
- Staggered animationsdoc
Flutter that applies a series of sequential and overlapping animations to a single widget. Tapping the screen begins an animation that changes opacity, size, shape, color
- Implicit animationsdoc
animation library , you can add motion and create visual effects for the widgets in your UI. One part of the library is an assortment of widgets
- Advanced scrolling and sliversdoc
with slivers. In this lesson, you'll learn about slivers, which are special widgets that can take advantage of Flutter's powerful and composable scrolling system. Slivers
- Rebuild UI when state changesdoc
layer is your UI, and in Flutter, that refers to your app's widgets. As it pertains to this tutorial, the important part is wiring up your
- How Flutter worksdoc
anyone beginning to research Flutter who wants to understand the big picture. Widgets and the three trees {:#three-trees} Dive into Flutter's architecture by exploring
- Fade a widget in and outdoc
fade a widget in and out. UI developers often need to show and hide elements on screen. However, quickly popping elements on and off the screen
- Scrollingdoc
Overview of Flutter's scrolling support Flutter has many built-in widgets that automatically scroll and also offers a variety of widgets that you can customize
- Handle scrollingdoc
through lists using the widget tests, use the methods provided by the WidgetTester class, which is included in the flutter_test package: In this recipe, learn
- SafeArea & MediaQuerydoc
This page discusses how and when to use the SafeArea and MediaQuery widgets. SafeArea When running your app on the latest devices, you might encounter bits
- Taps, drags, and other gesturesdoc
down, the framework does a hit test on your app to determine which widget exists at the location where the pointer contacted the screen. The pointer down
- Pass arguments to a named routedoc
using the following steps: Define the arguments you need to pass. Create a widget that extracts the arguments. Register the widget in the routes table. Navigate
- Guide to app architecturedoc
The recommended way to architect a Flutter app. The following pages demonstrate
- LayoutBuilder and adaptive layoutsdoc
Learn how to use the LayoutBuilder widget. Learn how to create layouts that adapt to different screen widths. Introduction Modern apps need to work well on screens
- Animations API overviewdoc
animation concepts. The animation system in Flutter is based on typed Animation objects. Widgets can either incorporate these animations in their build functions directly by reading their
- Simple animationsdoc
using them is with implicit animations . "Implicit animations" refers to a group of widgets that automatically animate changes to their properties without you needing to manage
- Stack-based navigationdoc
contact list for that group. First, revert changes in the adaptive layout widget so that it displays the ContactGroupsPage by default on small screens. Add navigation
- Introduction to animationsdoc
animation support makes it easy to implement a variety of animation types. Many widgets, especially Material widgets , come with the standard motion effects defined in their
- Flutter performance profilingdoc
Diagnosing UI performance issues in Flutter. Overview App performance encompasses various aspects
- Using slivers to achieve fancy scrollingdoc
explains how to implement custom scrolling using the sliver classes. SliverAppBar : A one-minute Widget-of-the-week video that gives an overview of the SliverAppBar widget
- Handling errors in Flutterdoc
console as well. the ErrorWidget.builder callback is invoked to build the widget that is used instead of the one that failed. By default, in debug mode this
- Send data to a new screendoc
pass information about the item that's been tapped. Remember: Screens are just widgets. In this example, create a list of todos. When a todo is tapped
- Approaches to state managementdoc
Brian Egan Built-in approaches setState The low-level approach to use for widget-specific, ephemeral state. Adding interactivity to your Flutter app , a Flutter tutorial Basic
- Animate a page route transitiondoc
How to animate from one page to another. A design language, such
- Create lists with different types of itemsdoc
with different types of items. Convert the data source into a list of widgets. 1. Create a data source with different types of items Types of items
- Common architecture conceptsdoc
different class than the search logic. In Flutter, this applies to widgets in the UI layer as well. You should write reusable, lean widgets that hold
- Navigate with named routesdoc
How to implement named routes for navigating between screens. applications. For more
- Build a form with validationdoc
form. 1. Create a Form with a GlobalKey Create a Form . The Form widget acts as a container for grouping and validating multiple form fields. When creating
- Differentiate between ephemeral state and app statedoc
local state ) is the state you can neatly contain in a single widget. This is, intentionally, a vague definition, so here are a few examples. current page
- Debug Flutter appsdoc
performance and profiling tools that run in a browser. Flutter inspector , a widget inspector available in DevTools, and also directly from Android Studio and IntelliJ (enabled with
- Retrieve the value of a text fielddoc
that you discard any resources used by the object. // Define a custom Form widget. class MyCustomForm extends StatefulWidget { const MyCustomForm({super.key}); @override State createState() => _MyCustomFormState(); } // Define
- Improving rendering performancedoc
Flutter's Skia engine and its ability to quickly create and dispose of widgets, Flutter applications are performant by default, so you only need to avoid common
- Integration testing conceptsdoc
Learn about integration testing in Flutter. Unit tests and widget tests validate individual classes, functions, or widgets. They don't validate how individual pieces work together
- Animate the properties of a containerdoc
using implicit animations. The Container class provides a convenient way to create a widget with specific properties: width, height, background color, padding, borders, and more. Simple animations
- Accessibility testingdoc
Information on Flutter's accessibility testing. Accessibility regulations To ensure your app
- Use listsdoc
data is a fundamental pattern for mobile apps. Flutter includes the ListView widget to make working with lists a breeze. Create a ListView Using the standard ListView
- Navigate to a new screen and backdoc
route is equivalent to a ViewController . In Flutter, a route is just a widget. This recipe uses the Navigator to navigate to a new route. The next
- Create a grid listdoc
items that come one after the next. For this task, use the GridView widget. The simplest way to get started using grids is by using the GridView.count
- Accessibilitydoc
Information on Flutter's accessibility support. Background Ensuring that apps are accessible
- Navigation and routingdoc
application to handle deep links, see Deep linking . Using the Navigator The Navigator widget displays screens as a stack using the correct transition animations for the target