This allows the scheduler library to depend on the services library
and the painting library to depend on the scheduler library without
the services library having to depend on the scheduler library.
While I was at it I also cleaned up some of the binding logic: the
licenses logic can now be overridden (and the test library does so),
and the image cache can now be overridden as well.
Summary:
- Add `key` field to `SemanticsNode`, while moving key into `foundation` library so it can be used by the render layer.
- Introduce `SemanticsProperties` and move many of the `Semantics` fields into it.
- Introduce `CustomPaintSemantics` - a `SemanticsNode` prototype created by `CustomPainter`.
- Introduce `semanticsBuilder` and `shouldRebuildSemantics` in `CustomerPainter`
**Breaking change**
The default `Semantics` constructor becomes non-const (due to https://github.com/dart-lang/sdk/issues/20962). However, a new `const Semantics.fromProperties` is added that still allowed creating constant `Semantics` widgets ([mailing list announcement](https://groups.google.com/forum/#!topic/flutter-dev/KQXBl2_1sws)).
Fixes https://github.com/flutter/flutter/issues/11791
Fixes https://github.com/flutter/flutter/issues/1666
UnconstrainedBox will allow its child to size itself as if it had no constraints, and then attempt to fit around that object, until its own constraints are exceeded, in which case it will clip and display an overflow warning.
I also factored out DebugOverflowIndicator, which will draw overflow indicators on containers which overflow but aren't expected to.
This will enable both to be RTL'ed.
Also, factor out common border painting code into paintBorder.
Also, make Border paint uniform non-rounded borders using drawRect.
Also, add some documentation about an issue that wasted an hour of my life.
Also, factor out all the border painting code into TableBorder.paint.
The Wrap widget is a layout that places children in a run in order along its
main axis until it runs out of space. At that point, starts placing children in
a new run that is adjacent in the cross axis.
Fixes#8831
This patch adds grid supports to slivers and introduces a ScrollGrid
convenience class for making the common types of scrollable grids.
This patch also deploys ScrollGrid in an example in the Flutter Gallery.
Add SliverList
A SliverList is a linear layout of box children in a viewport that all
have a common, fixed extent along the scroll axis. The layout is similar
to a SliverBlock but more efficient.
* add import guidance to library-level docs
* add import docs to other packages
* fix review comment
* clarify which libraries aren't meant to be directly imported
A flow layout is optimized for reposition children with transformation
matrices. A flow layout can animate the position of its children very
efficiently.
Bindings now have a debugRegisterServiceExtensions() method that is
invoked in debug mode (only). (Once we have a profile mode, there'll be
a registerProfileServiceExtensions() method that gets called in that
mode only to register extensions that apply then.)
The BindingBase class provides convenience methods for registering
service extensions that do the equivalent of:
```dart
void extension() { ... }
bool extension([bool enabled]) { ... }
double extension([double extension]) { ... }
Map<String, String> extension([Map<String, String> parameters]) { ... }
```
The BindingBase class also itself registers ext.flutter.reassemble,
which it has call a function on the binding called
reassembleApplication().
The Scheduler binding now exposes the preexisting
ext.flutter.timeDilation.
The Renderer binding now exposes the preexisting ext.flutter.debugPaint.
The Renderer binding hooks reassembleApplication to trigger the
rendering tree to be reprocessed (in particular, to fix up the
optimisation closures).
All the logic from rendering/debug.dart about service extensions is
replaced by the above.
I moved basic_types to foundation.
The FlutterWidgets binding hooks reassembleApplication to trigger the
widget tree to be entirely rebuilt.
Flutter Driver now uses ext.flutter.driver instead of
ext.flutter_driver, and is hooked using the same binding mechanism.
Eventually we'll probably move the logic into the Flutter library so
that you just get it without having to invoke a special method first.
Transform applies its transform before painting, but sometimes you want
the widget to layout after its transform has been applied. We can't
handle general tranforms in this way because we can't couple width and
height constriants, but we can handle certain rotations.
Fixes#1214
This patch sketches out the basic widgets for creating Mozart child
views. We're still missing some of the machinery, so we can't quite
create child views yet, but once we supply the ViewHost and teach the
compositor how to actually display the child scenes, we'll have
something that works.
This patch restructures how we size the editing region of the Input widget. Now
RenderEditableLine understands that it's a single-line editing widget and sizes
itself correctly.
ScrollableList2 uses the same pattern as ScrollableGrid, which requires the
client to allocate widgets for every list item but doesn't inflate them unless
they're actually needed for the view. It improves on the original
ScrollableList by not requiring a rebuild of the whole visible portion of the
list when scrolling. In fact, small scrolls can often be handled entirely by
repainting.