3255 Commits

Author SHA1 Message Date
Adam Barth
5ecf8786b4 Add ScrollView.padding (#7690)
Uses SliverPadding to implementing paddding in ScrollView. Also, deploy
ScrollView in more places now that it implements padding.

Finally, remove loader_app.dart because it is not referenced.
2017-01-26 23:14:37 -08:00
Adam Barth
9c288040ce Improve SliverBlockDelegate.estimateScrollOffsetExtent (#7689)
We now report an accurate estimate when the lastIndex is the final index
in the list.

Also, we now project forward from the lastIndex using the extent of the
reified children instead of trying to project forward from index 0.

This new algorithm leads to estimation error as you reach the end of a
list, avoiding some ballistic overscrolls.
2017-01-26 22:59:10 -08:00
Ian Hickson
ed2be89569 Try moving from closures to direct calls. (#7679)
Rumours have it that this is faster now.

Fixes https://github.com/flutter/flutter/issues/5154
2017-01-26 18:54:48 -08:00
Adam Barth
a90e25502a Don't overshoot ballisitic scroll activities (#7670)
When we start a ballisitic scroll activity to correct an out-of-range scroll
offset, make sure we start with a velocity that is headed in the right
direction.
2017-01-26 17:26:24 -08:00
Todd Volkert
8a1990ce45 Separate data_table_test util code into its own file. (#7663)
This yields a cleaner separation between common testing code
and actual tests (a distinction which is important in Google's
internal build system).
2017-01-26 12:46:28 -08:00
Todd Volkert
71242888f1 Revert method generics in packages/flutter/lib/src/http (#7662)
We converted all code to use method generics in #7235, but
we shouldn't have touched the `http` folder since this code
is pulled from upstream.
2017-01-26 12:46:00 -08:00
Ian Hickson
7c40446a69 proxy_box tests (#7658) 2017-01-26 08:00:24 -08:00
Adam Barth
a4eca31777 Use ScrollView in examples a manual_tests (#7645)
This patch deploys ScrollView in a number of demos and manual tests.
2017-01-25 21:59:03 -08:00
Ian Hickson
46792dc2c4 Speed up hot reload in the framework. (#7647) 2017-01-25 17:54:56 -08:00
Ian Hickson
25223c75bd New scrollbars for the scrollable refactor (#7646) 2017-01-25 17:51:25 -08:00
Adam Barth
600c75cb11 Viewport2 should clip visual overflow (#7641)
When you put a box in a Viewport2, it might paint outside its allocated bounds.
This patch teaches Viewport2 to clip when that happens.
2017-01-25 15:54:46 -08:00
Ian Hickson
9ff2e978cd Sliver Padding (#7628) 2017-01-25 15:00:57 -08:00
Hans Muller
9cfcd3fdec Corrected the "Routes can return a value" example (#7638) 2017-01-25 15:00:18 -08:00
Ian Hickson
1426ef9944 Appbar slivers. (#7631) 2017-01-25 13:18:57 -08:00
Adam Barth
eba5fb1a18 Add a sliver-based ScrollView (#7627)
This patch introduces ScrollView, which is a convenience widget for using a
SliverBlock. This patch also switches a number of tests from Block to
ScrollView. Once we support more features of block (e.g., padding and
shrinkwrapping), we'll be able to move over more clients.
2017-01-25 12:51:22 -08:00
Adam Barth
0eb8f94b1c Fix display list harness diagnostics (#7634) 2017-01-25 10:08:11 -08:00
Hans Muller
e5aa1b1e4e Added PageRouteBuilder (#7632) 2017-01-25 08:50:30 -08:00
Ian Hickson
94fab77bea More docs updates for services. (#7633) 2017-01-24 23:34:16 -08:00
Ian Hickson
6bd578ff52 Reword the SystemChrome docs to be in the Flutter voice and style. (#7599) 2017-01-24 23:29:33 -08:00
Ian Hickson
58348612a3 Factor out debugPaintPadding and test it (#7598)
I plan to use this to implement similar logic in SliverPadding.

To make this easier to test I extended the paints matcher to accept a
function that takes a canvas. While I was at it I also made it accept
a Finder, it'll go and find the render object for you.

Also added support for paints..path and fixed some grammar in the
error messages.

Also improved the docs for debugPaint*.
2017-01-24 16:08:27 -08:00
Adam Barth
559621ca5a Add SingleChildScrollView (#7620)
This widget is a replacement for ScrollableViewport that uses the new
Scrollable2 machinery. The widget is not based on Slivers but does use the new
scroll behavior classes.
2017-01-24 15:16:01 -08:00
Ian Hickson
f683abd757 Sliver Block (#7618) 2017-01-24 15:06:53 -08:00
Hans Muller
8c5bee9405 Add Navigator.pushReplacement() and Navigator.pushReplacementNamed() (#7611) 2017-01-24 11:36:48 -08:00
Ian Hickson
1bdf351818 Merge pubspec.yaml and flutter.yaml. (#7605) 2017-01-24 11:19:31 -08:00
Adam Barth
134096022c Test PaginatedDataTable (#7594)
This patch contains some basic tests for PaginatedDataTable.
2017-01-23 21:36:42 -08:00
Hans Muller
44f957d606 Prevent overlapping hero transitions from starting (#7568) 2017-01-23 14:52:32 -08:00
Ian Hickson
a34ae0f99d Talk about how to resize IconButtons more. (#7595)
Answers http://stackoverflow.com/questions/41729278/why-is-this-icon-being-clipped
2017-01-23 14:42:30 -08:00
Ian Hickson
84c0b34782 Test some of the sliver helper classes (#7574) 2017-01-23 13:36:44 -08:00
Adam Barth
bf296f715e Test DataTable (#7591)
This patch adds a basic test for the DataTable widget.
2017-01-23 12:40:51 -08:00
Ian Hickson
63aa1397a3 Increase the strictness of our requiring explicit types (#7585)
...now that we have generic methods, their types need to be specified too.
2017-01-23 01:04:31 -08:00
Adam Barth
99822088a7 Add operator== and hashCode to TextTheme (#7586)
Teach `paints` matches about `drawRect` and how to `paintChild`.

Also, improve test coverage.
2017-01-23 00:06:58 -08:00
Ian Hickson
cbda208b4b Reduce the amount of spam from analyze watch. (#7582)
See https://github.com/dart-lang/sdk/issues/28463, which I think is a
regression.

This also fixes the regression introduced by
https://codereview.chromium.org/2559773002 whereby we were no longer
checking any of the lints.
2017-01-22 16:43:24 -08:00
Ian Hickson
9573bc14e0 Avoid double negatives in text editing APIs (#7577)
hideText -> obscureText
hideDivider -> !showDivider
2017-01-21 23:34:54 -08:00
Ian Hickson
15a7eb3b6c Move to real generic method syntax (#7235) 2017-01-21 20:58:44 -08:00
Ian Hickson
2e196037f5 Improve the order of members in the mock_canvas file. (#7573)
This will make it easier to understand what this file does.
2017-01-20 22:31:41 -08:00
Ian Hickson
36464ca659 About box should default to the executable name. (#7572)
Removes some TODOs now that https://github.com/flutter/flutter/issues/3648 is fixed.
2017-01-20 16:44:19 -08:00
Ian Hickson
63160b3dab Scrolling Refactor (#7420) 2017-01-20 16:18:56 -08:00
Adam Barth
e52bda2cd0 Document the value that Navigator.push completes to (#7569)
Also, synchronize the docs between Navigator.push and NavigatorState.push (and
friends).
2017-01-20 15:39:06 -08:00
Adam Barth
0f1d97756d Strengthen animation listener iteration patterns (#7566)
This patch aligns the iteration patterns used by animations and
ChangeNotifier. They now both respect re-entrant removal of listeners
and coalesce duplication registrations. (Also, ChangeNotifier
notification is no longer N^2).

This patch introduces ObserverList to avoid the performance regression that the
previous version of this patch caused.

Fixes #7533
2017-01-20 15:38:53 -08:00
Ian Hickson
c5fcaf6dea Introduce a paints matcher, and convert the previous customers of (#7567)
MockCanvas to use it instead.

Currently it only supports a very limited set of drawing features, but
adding new ones is easy.

Once the feature set is more complete, and we've used this a bunch, if
it feels right, this API will get promoted to flutter_test.
2017-01-20 15:28:00 -08:00
Adam Barth
3b104a813f Improve test coverage (#7564)
Also, fix some minor bugs with SynchronousFuture.
2017-01-20 15:15:27 -08:00
Ian Hickson
86f5c78f2c Document that the default text color is white. (#7565)
Answers http://stackoverflow.com/questions/41371449/how-do-you-use-a-textpainter-to-draw-text
2017-01-20 14:57:52 -08:00
Adam Barth
61760f63e9 Rename RawInput to EditableText (#7556)
This patch is part of a series to rationalize our text input classes.

See #7031
2017-01-20 11:39:36 -08:00
Michael Goderbauer
ab1cd3f816 Fix doc comment about onPressed for various buttons (#7555) 2017-01-20 09:35:35 -08:00
Adam Barth
930b52a3e5 Rename InputFormField to TextField
This patch is the first of a series to rationalize the names of the text-input
related widgets.

See #7031
2017-01-19 14:53:08 -08:00
Adam Barth
aa82b741e2 Revert "Strengthen animation listener iteration patterns" (#7552) 2017-01-19 14:36:25 -08:00
Adam Barth
3312af7da5 Strengthen animation listener iteration patterns (#7537)
This patch aligns the iteration patterns used by animations and
ChangeNotifier. They now both respect re-entrant removal of listeners
and coalesce duplication registrations. (Also, ChangeNotifier
notification is no longer N^2).

Fixes #7533
2017-01-18 22:17:13 -08:00
Adam Barth
9f36737f3a InkSplash and InkHighlight shouldn't be special (#7531)
Previously, these classes where in material.dart, which meant they could
access private interfaces in that library. This patch moves them out
into their own files so that they need to play by the rules of the
public API.

Fixes #5969
2017-01-18 16:40:00 -08:00
Adam Barth
712eb969ea CustomSingleChildLayout should be able to resize (#7528)
It's not correct to set sizedByParent for
RenderCustomSingleChildLayoutBox because the delegate's size function
might depend on information other than the incoming constraints.
2017-01-18 16:33:42 -08:00
Adam Barth
23361d5ab6 Improve Route lifecycle (#7526)
Previously the navigator wouldn't always call Route.dispose when it was
removed from the tree. After this patch, the navigator remembers popped
routes so that it can call dispose on them when it is removed from the
tree.

Also, improve some error messages around calling dispose() more than
once on routes and AnimationControllers.

Fixes #7457
2017-01-18 16:32:44 -08:00