2479 Commits

Author SHA1 Message Date
Adam Barth
bb238eba88 Fix typo in LazyBlock (#3594)
We were returning instead of breaking out of the loop when we hit the last
widget.

Fixes #3593
2016-04-27 17:46:44 -07:00
Hans Muller
620fb87567 Enable lining up the last tool bar action trailing list item elements (#3597) 2016-04-27 17:34:59 -07:00
Adam Barth
4aa3756835 Move cassowary into package:flutter (#3591)
Cassowary doesn't have any additional dependencies and this simplifies things.

Fixes #2442
2016-04-27 17:32:06 -07:00
Adam Barth
d8f2d018ad Expose dispatchDependencyChanged in InheritedWidget (#3580)
Some inherited widgets want to call this function direction, for example to
notify children when a mutable model object changes. Exposing this function to
subclasses of InheritedWidget is clear then forcing them to compute
updateShouldNotify for mutable model objects.
2016-04-27 15:51:20 -07:00
Adam Barth
cbe650a7e6 Move newton into package:flutter (#3585)
Rather that importing `package:newton/newton.dart` you can
`import package:flutter/physics.dart`.

Fixes #2441
2016-04-27 13:09:54 -07:00
Adam Barth
7ef1df4d5b Remove fetch.dart (#3584)
These uses cases are now address by http.dart via http.readDataPipe.
2016-04-27 13:09:37 -07:00
Ian Hickson
256adfcd46 Fix leaking animation in floating action button. (#3575) 2016-04-27 12:30:48 -07:00
Hans Muller
0f1dbe09af Fixes TimePicker (#3583)
* Fixed TimePicker crash and added tests

* Fixed TimePicker crash and added tests

* fixed a Lint-O
2016-04-27 12:26:18 -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
67bf268de1 Add dartdoc to typography.dart (#3576) 2016-04-27 09:15:23 -07:00
Adam Barth
1b872603f3 Keyboard causes Scaffold body to resize (#3570)
This patch adds an option to Scaffold to disable resizing the body to avoid the
window padding. This lets developers create layouts that are stable when the
keyboard overlays the app.

Fixes #3565
2016-04-27 09:14:54 -07:00
Adam Barth
2781a0868a Tooltips show up in the wrong place (#3574)
We had a math-o.

Fixes #3563
2016-04-26 16:59:29 -07:00
Adam Barth
51b1550df7 Delay win-by-default in gesture arena (#3552)
Wait until the end of the microtask to tell gesture recognizers that
they've won in the gesture arena. This lets recognizers dispose reject
themselves at arbitrary times without triggering gestures in awkward
call stacks.

Fixes #3183
2016-04-26 14:52:31 -07:00
Adam Barth
4399fea12d Icons in material buttons should match text color (#3551)
Fixes #3186
2016-04-25 23:17:49 -07:00
Adam Barth
c6942c9945 Implement MainAxisAlignment.spaceEvenly (#3550)
Fixes #3289
2016-04-25 23:10:14 -07:00
Adam Barth
cc9d602b12 Block should work inside LazyBlock (#3546)
Previously we were locking down the state even when calling layout in
LazyBlock. Now we lock only when building children. Making this work well
involved moving the catch out of lockState and into the few callers who
actually wanted it.

Fixes #3534
2016-04-25 16:57:27 -07:00
Adam Barth
00f10da17f Document some construtors in transitions.dart (#3522) 2016-04-25 15:37:38 -07:00
Adam Barth
23634de989 Merge pull request #3535 from abarth/null_body
Handle the case of a null body in response.dart
2016-04-25 14:36:27 -07:00
Adam Barth
e5d09cb682 Handle the case of a null body in response.dart
We're supposed to return a null string when the HTTP response doesn't have a
body. Also handle the case of not having a headers map.
2016-04-25 14:22:11 -07:00
Hans Muller
2e4aa795e3 FlexibleSpaceBar should not include transparent widgets (#3527) 2016-04-25 11:46:28 -07:00
Adam Barth
e7dd870774 Improve docs for MediaQueryData.size
This would have answered a question we go on flutter-dev.

Fixes #3517
2016-04-25 09:31:11 -07:00
Adam Barth
8ce2f859ce Merge pull request #3516 from abarth/tweaks
Add Flow layout
2016-04-23 21:17:58 -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
Adam Barth
3ca80d9e35 A few minor improvements
This patch contains a few minor improvements to the framework that I ran
across while working on a new layout model.
2016-04-23 14:23:31 -07:00
Adam Barth
9d900ea75a Improve dartdoc for extent callbacks (#3514)
Fixes #3510
2016-04-23 09:45:43 -07:00
Adam Barth
e7f335862a Address review comments (#3515)
Somehow I missed these in my previous patch.
2016-04-23 09:07:55 -07:00
Adam Barth
8ac9cc45cc Improve the docs for Text and RichText (#3507)
Fixes #3503
2016-04-22 16:53:02 -07:00
Adam Barth
a5e794ca42 A blinking cursor should push only one frame (#3445) (#3506)
Prior to this patch, we were pushing two frames each time the cursor blinked.
In turning the cursor on or off, the markNeedsPaint call was triggering another
frame to be scheduled because we cleared a bit in the scheduler at the
beginning of the frame instead of at the end of the frame.

To implement scheduling correctly, we actually need two bits: one for
ensureVisualUpdate, which just promises to get to the end of the pipeline soon,
and scheduleFrame, which promises to get to the beginning of the pipeline soon.

(Reland)
2016-04-22 16:40:20 -07:00
Ian Hickson
b5a827bfa1 Clean up our timeline events. (#3504)
This adds in particular the ability to track the time at which the
framework boots up, and the time at which we are confident we have
completed the first useful frame.
2016-04-22 13:04:06 -07:00
Adam Barth
0d7b61f51e Improve elevation docs (#3502)
Fixes #3501
2016-04-22 12:58:03 -07:00
Adam Barth
d74025f451 Fix analyzer warning (#3499)
We don't need this assert anyway.
2016-04-22 11:36:15 -07:00
Adam Barth
c486fc4a96 Revert "A blinking cursor should push only one frame (#3445)"
This reverts commit 161f945e84bd3c801f32a030245f37755d5f677a.

This patch caused a number of regressions.

Fixes #3497
2016-04-22 11:05:52 -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
Hans Muller
03f9210641 Refactored MaterialApp (#3475)
* Refactored MaterialApp
2016-04-21 17:14:22 -07:00
Hans Muller
a6532cc731 Remove IconThemeData.clampedOpacity (#3483)
* Remove IconThemeData.clampedOpacity
2016-04-21 17:11:20 -07:00
Ian Hickson
c167efca17 Minor widget_tester refactoring and docs (#3472)
This reorders some classes so that this file makes more sense, and adds
a bunch of docs. It also makes the following changes:

* Move allElements from Instrumentation to TestWidgets. (Instrumentation
  is going away.)

* Remove findElements.

* Rename byElement to byElementPredicate

* Rename byPredicate to byWidgetPredicate

* Implement _WidgetPredicateFinder so that byWidgetPredicate has good
  messages

* Fix one use of byElementPredicate to use byWidgetPredicate.
2016-04-21 16:35:46 -07:00
Ian Hickson
0e11b0e6e3 Make the widgets binding reusable. (#3479)
Previously the widgets layer only provided a concrete binding, which
makes it awkward to extend it compared to other bindings. This moves
widgets to the same style as the other layers.

In a subsequent patch I'll use this to make the tests layer saner.
2016-04-21 16:06:51 -07:00
Matt Perry
6ca36a94b7 Add a text selection handle for the collapsed case. (#3467)
Also simplify handle drawing. All 3 cases are the same, just rotated.

Also fix selection changes on iOS.
2016-04-21 17:08:27 -04:00
Eric Seidel
cd084005fa Merge pull request #3470 from eseidelGoogle/master
Add a service extension for toggling the PerformanceOverlay
2016-04-21 13:29:23 -07:00
Eric Seidel
898b3ce8ba Add a service extension for toggling the PerformanceOverlay
This only works for apps which use WidgetsApp.  Apps which don't
(like the game) could presumably read the static themselves
off of WidgetsApp.

@devoncarew @hixie
2016-04-21 12:55:49 -07:00
Ian Hickson
3142aba407 Refactor the Gesturer's interfaces (#3459)
* Refactor the Gesturer's interfaces

This makes them more coherent.

It also makes it easier for the tests to override each specific part of
hit-testing, should that be necessary.

* Update binding.dart
2016-04-21 12:20:01 -07:00
Matt Perry
11f236ec25 Add basic text selection to editable text. (#3223)
Only partially works. Editing the selected text doesn't work very well,
which probably will require engine changes. Currently only draws the
selected text and allows you to manipulate the selection with draggable
selection handles.
2016-04-21 13:53:31 -04:00
Hans Muller
986b017445 Gallery Smoke Test (#3446)
* Gallery Smoke Test
2016-04-21 08:54:43 -07:00
Adam Barth
161f945e84 A blinking cursor should push only one frame (#3445)
Prior to this patch, we were pushing two frames each time the cursor blinked.
In turning the cursor on or off, the markNeedsPaint call was triggering another
frame to be scheduled because we cleared a bit in the scheduler at the
beginning of the frame instead of at the end of the frame.

To implement scheduling correctly, we actually need two bits: one for
ensureVisualUpdate, which just promises to get to the end of the pipeline soon,
and scheduleFrame, which promises to get to the beginning of the pipeline soon.
2016-04-20 20:36:39 -07:00
Matt Perry
fffbf6e97b Fix OverlayEntry.remove to work even after the Overlay is disposed. (#3412) 2016-04-20 17:35:49 -04:00
Ian Hickson
112f2cc37b Reset _simulation at the end of a fling (#3435)
Also a bit of code cleanup.

The key part of this patch is the addition in `_endScroll` to reset
`_simulation`. It seems like this was the one place where it's possible
for us to end the animation but not reset our state. Since we assert
that are state is coherent, we were hitting asserts when a fling
finished and then you interacted with the widget again.
2016-04-20 11:02:20 -07:00
Hans Muller
25164e1089 Make IconButton gesture targets as big as possible (#3423)
* Make IconButtons as big as possible
2016-04-20 10:00:14 -07:00
Ian Hickson
1b9476c4d9 Hide routes from the API when they're not needed. (#3431)
The 'routes' table is a point of confusion with new developers. By
providing a 'home' argument that sets the '/' route, we can delay the
point at which we teach developers about 'routes' until the point where
they want to have a second route.
2016-04-20 09:33:28 -07:00
Viktor Lidholt
f7360126b8 Gallery code snippets now analyzed (#3391)
* Gallery code snippets now analyzed
2016-04-20 09:29:01 -07:00
Ian Hickson
c294014d00 Remove deprecated API in EdgeInsets 2016-04-20 00:05:43 -07:00