
If you change the RenderObject tree between frames, you'll assert if you subsequently hit test. So e.g. if you get two button presses back to back, and you mutate the tree synchronously in response to the first one, the second will assert. This adds an onBuild callback to WidgetToRenderBoxAdapter to make it easier to do the updates at the right time, i.e., during widget build. It'll be called whenever you rebuild the WidgetToRenderBoxAdapter itself, so all you have to do to use it is call setState() on whoever is building the WidgetToRenderBoxAdapter.
Flutter Examples
This directory contains several examples of using Flutter. Each of these is an individual Dart application package.
To run a sample with the flutter
tool, run pub get
inside its directory,
then run flutter start
. (See the
getting started guide to install
the flutter
tool.)
Available examples include:
-
Hello, world. The hello world app is a basic app that shows the text "hello, world."
-
Stocks. The stocks app is an example of a typical mobile app built using Flutter. The app shows a list of all the stocks in the NASDAQ.
-
Widgets. The widget apps demonstrate a number of Flutter widgets so you can experiment with them in a simple container. There is no main.dart in this directory because each file is a standalone sample. To run a particular file, use
flutter start -t filename.dart
.