44 Commits

Author SHA1 Message Date
Ian Hickson
9ff2e978cd Sliver Padding (#7628) 2017-01-25 15:00:57 -08:00
Ian Hickson
1426ef9944 Appbar slivers. (#7631) 2017-01-25 13:18:57 -08:00
Ian Hickson
f683abd757 Sliver Block (#7618) 2017-01-24 15:06:53 -08:00
Ian Hickson
e82b18d47b The core RenderSliver protocol. (#7370)
This implements a new RenderViewport2 class to replace the existing
RenderViewport class.
2017-01-09 14:49:14 -08:00
Adam Barth
27970bd82d Remove package:flutter/cassowary.dart (#7350)
We didn't end up using this mechanism.
2017-01-05 13:08:43 -08:00
Ian Hickson
9c1a24fa72 Reexport meta from foundation. (#6938) 2016-11-18 21:22:32 -08:00
Adam Barth
67f97b455d Remove ChildView widget (#6195)
This widget now lives in Mozart:

https://fuchsia.googlesource.com/mozart/+/master/lib/flutter/child_view.dart
2016-10-03 23:35:43 -07:00
Dragoș Tiselice
6e9bbca401 Added AnimatedSize. (#5260)
Added a widget that implicitly animates the size of it child.
2016-08-18 11:03:21 -07:00
Adam Barth
c27a9e8292 Add offstage attribute to OffStage (#5059)
Also, add a few more debugging flags.
2016-07-27 12:26:07 -07:00
Adam Barth
14f42a6a48 Improve test coverage in rendering.dart (#4775) 2016-06-27 17:38:53 -07:00
Seth Ladd
f373617a76 add import guidance to library-level docs (#3530)
* 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
2016-04-27 11:33:00 -07:00
Adam Barth
f53a5a525b Add Flow layout
A flow layout is optimized for reposition children with transformation
matrices. A flow layout can animate the position of its children very
efficiently.
2016-04-23 21:02:32 -07:00
Ian Hickson
e968d91ca4 Rename binding abstract classes (#3482)
The old names were getting silly and started stepping on valuable namespace.

The new names are consistent and clear.
2016-04-21 17:18:46 -07:00
Ian Hickson
261923e5c6 Refactor service extensions (#3397)
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.
2016-04-19 10:53:58 -07:00
Ian Hickson
e41c1c0b06 Split services/ into services/ and foundation/ (#3350)
We're getting back to the point where we have a bunch of foundation APIs
and it's getting confusing having them mixed with services/.
2016-04-15 13:18:29 -07:00
Hixie
6af9e6c96b RenderTable 2016-03-25 18:40:18 -07:00
Hixie
a4ee70c075 Flesh out rendering library top-level docs 2016-03-16 14:46:14 -07:00
Adam Barth
e59b25b21f Add RotatedBox which applies a rotation before layout
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
2016-03-11 12:23:41 -08:00
Adam Barth
f30398a4c4 Initial work to add Mozart child views
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.
2016-02-03 09:07:11 -08:00
Hixie
28a1788371 Semantics 2016-01-27 10:04:49 -08:00
Adam Barth
bdef1038e9 Input widget shrinks when typing a space
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.
2016-01-22 13:18:24 -08:00
Ian Hickson
88c43c3f4e Rename StatisticsOverlay to PerformanceOverlay. 2016-01-10 23:47:42 -08:00
Adam Barth
99bca282c9 Introduce ScrollableList2
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.
2016-01-04 16:34:39 -08:00
Ian Hickson
ade93651ac Refactor bindings. 2015-12-13 23:34:41 -08:00
Adam Barth
09cf84d9b6 Move RenderTogglable to material.dart
Fixes #219
2015-11-25 23:15:17 -08:00
Hans Muller
5ea50bf485 Adds CustomMultiChildLayout
CustomMultiChildLayout delegates to a MultiChildLayoutDelegate. Widget children are specified by their index in the list of children.
2015-11-02 14:06:00 -08:00
Hixie
5214893043 OffStage
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.
2015-10-20 09:00:48 -07:00
Hixie
d0d84e1666 Sundry debugging aids and fixes
(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.
2015-10-16 16:41:56 -07:00
Adam Barth
7b31d9b2e4 Rationalize exports a bit more
The goal is to follow the guidelines in
https://github.com/flutter/engine/blob/master/sky/specs/style-guide.md#packages

Fixes #1638
2015-10-16 00:09:00 -07:00
Adam Barth
db3b9e8052 Rename App to MaterialApp
MaterialApp assumes that you're using material design.

Also move radial reaction and fix imports for stats box.
2015-10-09 10:27:22 -07:00
Hixie
37bda25196 Relative paths in internal flutter libraries
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.
2015-10-09 09:56:40 -07:00
Adam Barth
7662a30f85 Moves from vector_math to vector_math_64
* Moves from vector_math to vector_math_64
* Adds support for Float64List in Dart bindings
2015-10-01 14:46:13 -07:00
Jason Simmons
a6f41c8a10 Allow the Input/EditableText widget to scroll horizontally
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.
2015-09-29 10:40:37 -07:00
Devon Carew
e7f726c240 customize the generated dartdoc like flutter.io 2015-09-26 23:19:25 -07:00
Adam Barth
a74d02dadf Rename Sky to Flutter in a few more places 2015-09-26 12:46:03 -07:00
Adam Barth
62458b7b6d Lift docs from Markdown to dartdoc
I've also removed the top-level description of the Sky package. Instead, we
should host that content on flutter.io.
2015-09-18 10:50:45 -07:00
Hixie
2e0d5f9292 Improve the debugging information for Widget
If the build stack got long before, it would get cropped.
2015-09-11 13:25:17 -07:00
Adam Barth
6fc343a097 Remove package:sky/base
These files really belong on other libraries.
2015-09-08 10:59:07 -07:00
Devon Carew
eb869d096e working on generating docs as part of the build
revert PATH changes

fix typo

some dartdoc changes in files
2015-09-04 19:21:53 -07:00
Adam Barth
693ddcd8dd Move widgets and rendering inside src
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.
2015-09-02 13:38:00 -07:00
Adam Barth
c1bd6af997 Add dartdocs for RenderObject
... and other code in object.dart.
2015-09-01 12:24:27 -07:00
Adam Barth
35ac1f710e Add dartdoc for base 2015-08-30 13:03:03 -07:00
Eric Seidel
b122969624 Add support for RenderGrid
I'll write the Widget wrapper in the next CL, including adding
support for padding at the Widget layer.

@Hixie
2015-08-26 13:52:30 -07:00
Adam Barth
dea3a0922c Add package:sky/rendering.dart
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.
2015-08-18 21:39:51 -07:00