We used to use this mechanism to paint scrollbars, but it's awkward. The
new approach to scrollbars is much cleaner. This mechanism has no other
clients, so we should remove it.
This makes it possible to substitute 'flutter run' for 'flutter test'
and actually watch a test run on a device.
For any test that depends on flutter_test:
1. Remove any import of 'package:test/test.dart'.
2. Replace `testWidgets('...', (WidgetTester tester) {`
with `testWidgets('...', (WidgetTester tester) async {`
3. Add an "await" in front of calls to any of the following:
* tap()
* tapAt()
* fling()
* flingFrom()
* scroll()
* scrollAt()
* pump()
* pumpWidget()
4. Replace any calls to `tester.flushMicrotasks()` with calls to
`await tester.idle()`.
There's a guarding API that you can use, if you have particularly
complicated tests, to get better error messages. Search for
TestAsyncUtils.
Turns out a common use for Baseline is making sure that the child's
baseline is higher than it otherwise would be, e.g. with the Material
font or other symbols.
+ Add new demo to gallery to show data tables. (This currently doesn't
use a Card; I'll create a Card version in a subsequent patch.)
+ Fix checkbox alignment. It now centers in its box regardless.
+ Add Colors.black54.
+ Some minor fixes to dartdocs.
+ DataTable, DataColumn, DataRow, DataCell
+ RowInkWell
+ Augment dartdocs of materia/debug.dart.
+ DropDownButtonHideUnderline to hide the underline in a drop-down when
used in a DataTable.
+ Add new capabilities to InkResponse to support RowInkWell.
+ Augment dartdocs of materia/material.dart.
+ Add an assert to catch nested Blocks.
+ Fix a crash in RenderBox when you remove an object and an ancestor
used its baseline. (https://github.com/flutter/flutter/issues/2874)
+ Fix (and redocument) RenderBaseline/Baseline.
+ Add flex support to IntrinsicColumnWidth.
+ Document more stuff on the RenderTable side.
+ Fix a bug with parentData handling on RenderTable children.
+ Completely rewrite the column width computations. The old logic made
no sense at all.
+ Add dartdocs to widgets/debug.dart.
+ Add a toString for TableRow.
If two repaint boundaries mark themselves dirty, but the second one is a
child of the first, then the second one will get repainted by the first
and then when we come to paint it directly, we get confused because it
isn't dirty any more.
We ran into this in layout before. Apply the same fix. Also, apply the
same fix to composition while we're at it.
I ran into a case where I was setting minHeight=∞ and then calling
layout() with that constraint, which is all kinds of bad. To try to
catch this earlier, this patch now provides a way to catch constraints
that are requiring infinite values.
We don't _always_ check this because there are valid uses for
BoxConstraints.biggest, e.g. as an additionalConstraint.
Previously this was used by MixedViewport, but now we don't need it because
LazyBlockViewport has replaced MixedViewport.
I've also taken this opportunity to modernize RenderBlock.
- Add x and y to the parent data, in case it's useful. In point of fact,
I ended up not needing it.
- Make columnWidths settable rather than having a setter so that the
code in the widgets layer is more idiomatic.
- Teach setFlatChildren about avoiding unnecessary drop/adopt loops.
- Assert that the child list length is correct more aggressively so that
we catch the dumb bug I had more quickly next time.
- Improve the toString() to handle empty tables better.
- Resort the imports in framework.dart.
- Introduce a LocalKey for cases where you don't want to allow use of
GlobalKey.
- Make inflateWidget and deactivateChild public for subclass use.
- Table widget.
- Cell widget.
- TableRow fake widget.
New RenderAligningShiftedBox abstract class for render boxes with
"alignment", which as of now is:
- RenderPositionedBox
- RenderConstrainedOverflowBox (ex RenderOverflowBox)
- RenderSizedOverflowBox
- RenderFractionallySizedOverflowBox (ex RenderFractionallySizedBox)
(The respective widgets are Align, OverflowBox, SizedOverflowBox, and
FractionallySizedBox. They haven't been renamed.)
Also I added some toString details.
This reverts commit f41b3411da35929b09009e47cb52474389e42874, reversing
changes made to e33d8d96212f3e337a6660f1eb1118bffc945bf5.
This was a bad check-in due to my mangling uploading a new version of the branch from a different machine.
This reverts https://github.com/flutter/flutter/pull/2639 and will be replaced by https://github.com/flutter/flutter/pull/2640
Now we just have one TextSpan class that handles both simple strings, trees of
children, and styling both. This approach simplifies the interface for most
clients.
This patch also removes StyledText, which was weakly typed and tricky to use
correctly. The replacement is RichText, which is strongly typed and uses
TextSpan.
Each layer is supposed to reexport the parts of the previous layer
that are part of its API.
- In painting.dart, export from dart:ui all the Canvas-related APIs
that make sense to be used at higher levels, e.g. PaintingStyle.
- Delete painting/shadows.dart. It was dead code.
- In rendering/object.dart, export all of painting.dart.
- In widgets/basic.dart, export all of painting.dart and
animation.dart. Some classes in animation/ are renamed to make this
less disruptive and confusing to the namespace.
- Split out Stocks back into an import model rather than a part model,
so that it's easier to manage its dependencies on a per-file basis.
- Move Ticker to scheduler library.
- Remove as many redundant imports as possible now.
- Some minor nit picking cleanup in various files.