A MaterialList understands the sizing, padding, and scrollbar features of
Material Design lists.
Also, add CircleAvatar for showing the circular avatars that are commonly used
in material lists.
Add a AnimatedRelativeRectValue class for animating RelativeRects.
Add a PositionedTransition class for animating Positioned using
AnimatedRelativeRectValues.
Add a test for PositionedTransition.
Fix a math bug a RelativeRect found by the test.
Fix a logic bug in the two ParentDataWidget classes found by the test.
Specifically, they were marking the child dirty, rather than the parent.
The parentData is for the parent's layout, not the child's, so they have
to mark the parent dirty. (I didn't hoist this up to the superclass
because ParentData could be used for painting, hit testing,
accessibility, or any number of other things, and I didn't want to bake
in the assumption that it needed markNeedsLayout.)
- truncate pixel values to 1dp since there's really no point being told
the Size is 302.98732587287 by 648.28498579187.
- describe more Widgets so that debugDumpApp() is more useful.
- remove bufferValue from ProgressIndicator (cc @hansmuller) since it's
not yet implemented.
- half-hearted toString() for ThemeData. There's no point making a
complete one, since it would cause line-wrap even on big monitors in
debugDumpApp dumps, and you can easily get the actual values from a
debugging if that's the issue.
- flesh out BoxConstraints.toString() so that fully unconstrained and
fully infinite constraints are called out explicitly. I experimented
with adding even more special cases, e.g. calling out unconstrained
widths with fixed heights, etc, but it made the output less readable.
- remove a redundant _updateVariable() in AnimatedContainer (cc
@abarth).
- add more information to RenderView.toString().
If we haven't printed anything for a second, then reset the count of how
much we've printed.
I also reduced the amount of data to ~16kb until we pause because I saw
some corruption even pausing 1 second every ~32kb. (Numbers are
approximate because we're counting UTF-16 characters and some of the
characters in the output are multiple bytes in UTF-8.)
Introduce a class that can describe the metrics used in a Positioned
widget, to enable easier manipulation and storage of the values, e.g.
for animation purposes.
(These are all the debugging-related fixes and trivial typo fixes that I
extracted out of my heroes branch.)
Fix rendering.dart import order.
Introduce a debugLabel for Performances so that when you create a
performance, you can tag it so that if later you print it out, you can
figure out which performance it is.
Allow the progress of a PerformanceView to be determined (but not set).
Allow subclasses of PerformanceView that are constants to be created by
defining a constant constructor for PerformanceView.
Introduce a debugPrint() method that throttles its output. This is a
test to see if it resolves the problems people have been having with
debugDumpRenderTree() et al having their output corrupted on Android. It
turns out (according to some things I read On The Internets) that
Android only has a 64KB kernel buffer for its logs and and if you output
to it too fast, it'll drop data on the floor. If this does in fact
reliably resolve this problem, we should probably move the fix over to
C++ land (where "print" is implemented) so that any use of print is
handled (avoiding the interleaving problem we have now if you use both
debugPrint() and print()).
Fix a bug with the debugging code for "size". In the specific case of a
RenderBox having a parent that doesn't set parentUsesSize, then later
the parent setting parentUsesSize but the child having its layout
short-circuited (e.g. because the constraints didn't change), we didn't
update the _DebugSize object to know that now it's ok that the size be
used by the parent, and we'd assert.
Also, allow a _DebugSize to be used to set the size of yourself.
Previously you could only set your size from a regular Size or from your
child's _DebugSize.
Add more debugging information to various Widgets where it might be
helpful.
Make GlobalKey's toString() include the runtimeType so that when
subclassing it the new class doesn't claim to be a GlobalKey instance.
Include the Widget's key in the Element's description since we don't
include it in the detailed description normally (it's in the name part).
Fix a test that was returning null from a route.
Teach dumpRenderTree() to draw actual trees.
Make the TextStyle output terser so it doesn't overflow the output.
Make debugDumpApp() say what mode we're in (checked vs release).
Hide lifecycle state from release mode dumps (since it's checked-only state).