This patch contains a prototype of a new widget framework. In this framework,
Components can be reused in the tree as many times as the author desires. Also,
StatefulComponent is split into two pieces, a ComponentConfiguration and a
ComponentState. The ComponentConfiguration is created by the author and can be
reused as many times as desired. When mounted into the tree, the
ComponentConfiguration creates a ComponentState to hold the state for the
component. The state remains in the tree and cannot be reused.
Instead of having to manage the popup menu from your app's build
function, you now just call showPopupMenu() with the menu's position and
it takes care of everything for you.
This solves the problem that the popup menu was trying to mutate the
state of the navigator from within its own initState() function.
Also, remove the "route" argument to RouteBase.build() since it equals
"this" by definition...
Also, remove ModalOverlay, and instead put that logic in the navigator.
- Fix AnimationTiming to have defaults for 'interval' and 'curve' since
that seems to be how we use it.
- Merge RouteBase.build and RouteBase.buildTransition
- Get rid of HistoryEntry, since it added nothing
- Broke out RouteBase.createPerformance() so subclasses can change what
is created.
- Build the routes backwards so that we more efficiently avoid building
hidden routes.
- Introduce an explicit way (!hasContent) for RouteState to avoid
building, rather than the implicit "build returns null" we had before.
This will ensure that the width of an empty Input is consistent with the
width of an Input that contains text.
Also add a unit test for the Input widget and a way for tests to provide mock
implementations of Mojo services such as the keyboard.
Also, introduce Colors and Typography to hold the material colors and the
typography declarations. Previously we expected clients of these libraries to
import them into a namespace, but that doesn't play nice with re-exporting them
from material.dart.
When we sync() a Component, we need to clear the old Component's _child
pointer, otherwise if we reuse that Component we'll get confused about
what the old child is.
We need a short name more often than a tree dump, so toString() should
be the short name.
Make debugDumpRenderTree() a global like debugDumpApp(), for
consistency. It's hard to remember the
SkyBinding.instance.dumpRenderTree() incantation.
Fixes#1179.
We were not removing children if they were more recently synced than we
were. This makes no sense. We should remove all children unless they
were synced this very generation already (in which case they'll be
somewhere else in the tree by now).
Previously layout was exiting early because the frame view
was null. Now we actually compute some layout and paint the
text. This patch makes paragraph_builder_test pass.
This patch is part of a sequence of patches towards fewer top-level libraries.
In this patch, the gesture libraries are combined into one gestures.dart
library.