This command will produce an flx package. Currently, this command doesn't work
because we don't have the Flutter compiler downloaded from Google storage yet.
A future patch will make that happen.
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).
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.
Move _activeCardDragEndPoint near build() so it's more obvious that it
is part of the build state.
Make a couple of functions use setState() since they modify variables
that are used by build().
Add a more detailed comment to the empty setState() call, since those
are dubious in general and need explaining when they occur, lest people
start using them as magic incantations to Make Things Work.
If a StatefulComponent marks itself dirty, gets rebuilt, then its parent
gets rebuilt, its parent will find that its child is from a newer
generation and hasn't changed. Previously, we considered two stateful
nodes to not be syncable even if they were the same; combined with the
way the "old" node looks like it's been put elsewhere (since it's
already been synced), we end up confused as to why the new node is
already mounted.
This fixes the problem by making the canSync logic consider two
identical nodes as syncable (since they are; syncChild() short-circuits
that case), and by changing syncChildren to consider identical nodes as
matches even if they are already synced.
This specifically improves the reporting of exceptions in syncChild(),
and makes the way we've been adding information to toStringName() less
ad-hoc and easier to extend.
Also:
- don't mark a node as from the new generation if it is dirty, since we
know it still has to be built.
- establish the rule that you can't call setState() during initState()
or build().
- make syncChild() return early for unchanged children.
- update the tests, including adding a new one.
Surface all the constructor arguments of AnimationTiming in all its subclasses.
Remove some pointless casts.
Fix some typos.
Put constructors first in class declarations.
Remove some blank lines where they just confused the structure of the code.