* 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.
Introduces a new Widget that lays its child out, but does not render it.
Also, moves RenderOverflowBox to its own file since it has nothing to do
with proxy box really.
(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.
Now that you import a top-level file for each layer of the Flutter
framework, within the framework we can use relative paths without being
worried about the copy/pasta problem we used to have.
EditableText is now rendered using a custom RenderObject
(RenderEditableParagraph). RenderEditableParagraph draws the cursor,
handles scroll offsets, and provides feedback about the size of the text for
use by the scroll behavior.
Code outside of package:sky should import this code using
package:sky/rendering.dart
package:sky/widgets.dart
Moving this code into the "src" directory is a convention that signifies that
and it cleans up the generated dartdoc because the libraries in the src
directory aren't included in the generated documentation. Instead, the classes
are documented in the widgets.dart and rendering.dart libraries.
Similar to widgets.dart, rendering.dart exports the entire rendering layer.
Also, update the examples to use rendering.dart and widgets.dart. Also clean up
some exports so that the examples have more sensible imports.