5299 Commits

Author SHA1 Message Date
Ian Hickson
f17e3f45a5 Fix the 'p' command in hot reload. (#7969)
Turns out when I added tests, I broke the actual underlying functionality.
2017-02-08 14:24:25 -08:00
Chris Bracken
ecdf99c326 Revert "Make the text shorter so that it doesn't overflow (#7970)" (#7984)
This reverts commit ea21d0c542d05a7738a8357db48fe9490c25c621 which
didn't resolve the pagination control overflow issue. Commit
7425940d5be153430f98aa5b0735545f4a4fc3e5 replaces this as an alternate
workaround. Once flutter/flutter#7980 is resolved, we should revert
7425940d5be153430f98aa5b0735545f4a4fc3e5 and scroll instead.
2017-02-08 13:10:01 -08:00
Chris Bracken
7425940d5b Prevent overflow of pagination bar with Ahem font (#7977)
Once engine commit d49a6b110bced49fa318b0dd45bf409218df9ee5 rolls into
Flutter rolls in, we get correct font metrics for the Ahem font, used in
headless sky_shell test runs. Ahem has much wider glyphs than the system
font, which causes the PaginatedDataTable bottom bar to be much wider
and overflow the previous and next controls offscreen.

This commit reduces the number of rows such that the prev/next controls
are still just barely onscreen.
2017-02-08 12:29:15 -08:00
Ian Hickson
ea21d0c542 Make the text shorter so that it doesn't overflow (#7970)
The Ahem font has a much wider average text width than most fonts.
2017-02-08 10:44:54 -08:00
Adam Barth
2116f00b5f Switch TabBar to sliver-based scrolling (#7964) 2017-02-08 10:34:15 -08:00
Alexandre Ardhuin
28defe5053 use const constructor (#7968) 2017-02-08 10:33:31 -08:00
Devon Carew
d89f438699 improve the logger ui a bit for elapsed times (#7960)
* improve the logger ui a bit for elapsed times

* invert param

* update daemon.dart
2017-02-08 08:25:36 -08:00
Adam Barth
d29a94c379 Deploy Scrollable2.ensureVisible (#7951)
Also, switch Stepper over to using sliver-based scrolling.
2017-02-07 22:18:25 -08:00
Chris Bracken
2432b5205b Improve flutter doctor messages for ios-deploy (#7962)
Differentiate between the not-installed and the out-of-date scenario.
2017-02-07 18:52:50 -08:00
Devon Carew
f1f53460a4 remove sdk summaries (#7957) 2017-02-07 17:59:10 -08:00
xster
0c8e1813b3 Add a user friendly error message when no development team is selected for physical deployment (#7879) 2017-02-07 16:59:58 -08:00
Chris Bracken
b16a515d9c Handle non-fat frameworks in iOS app framework thinning (#7950)
Support for thinning app frameworks to the target architecture was added
in 708909fc6b4a6f50d024c0d36843883284001219. This commit adds support
and error-checking for non-fat frameworks that are not of the target
architecture. In such cases, we now fail the build, and emit an error
message and the contents of lipo -info for the affected framework.
2017-02-07 15:57:16 -08:00
Adam Barth
2eb4f2c37a Add PageController (#7948)
This patch improves PageView to the point where we can use it in the date
picker. Specifically, you now get onPageChanged notifications and you can
control which page is visible using a PageController.
2017-02-07 15:51:41 -08:00
Adam Barth
6ddd0bb4b8 Make ensureVisible work with sliver-based viewports (#7920)
There appears to be an issue with children before the center widget.
I've filled a bug about that issue and will follow up in a later patch.
2017-02-07 15:22:18 -08:00
Hans Muller
af587a154f Support for tests that respond to text input (#7915) 2017-02-07 14:54:18 -08:00
Hans Muller
c08bac8335 Form needs to clean up its scopedWillPopCallback (#7936) 2017-02-07 14:49:15 -08:00
zhenqiu1101
47666af54c Add find.descendant API to support find descendants of an element by passing the current element finder and the finder of descendant. (#7944)
* Add find.descendant API to support find descendants of an element by passing the current element and the finder of descendant.

* Add find.descendant API to support find descendants of an element by passing the current element finder and the finder of descendant.

* Add find.descendant API to support find descendants of an element by passing the current element finder and the finder of descendant.

* Add find.descendant API to support find descendants of an element by passing the current element finder and the finder of descendant.

* Add find.descendant API to support find descendants of an element by passing the current element finder and the finder of descendant.

* Add find.descendant API to support find descendants of an element by passing the current element finder and the finder of descendant.

* Add find.descendant API to support find descendants of an element by passing the current element finder and the finder of descendant.

* Add find.descendant API to support find descendants of an element by passing the current element finder and the finder of descendant.

* Add find.descendant API to support find descendants of an element by passing the current element finder and the finder of descendant.

* Add find.descendant API to support find descendants of an element by passing the current element finder and the finder of descendant.

* Add find.descendant API to support find descendants of an element by passing the current element finder and the finder of descendant.
2017-02-07 14:46:29 -08:00
Hans Muller
80956517e6 Additional TabController, DefaultTabController docs (#7930) 2017-02-07 14:32:03 -08:00
Chris Bracken
1926d11188 Thin iOS app frameworks to the target architecture (#7913)
* Support thinning iOS frameworks to supported architectures

When building against frameworks that are distributed as
multi-architecture fat binaries, we want to strip the frameworks we
distribute down to only the architectures specified in $ARCHS.

This patch adds:
* The ability to specify commands to xcode_backend.sh (if none is
  specified, run BuildApp for backward compatibility).
* A 'thin' command that invokes lipo to thin down the distributed as
  described above.

* Add framework thinning step to iOS build

Invokes xcode_backend.sh thin on the build application.

* Limit architectures to arm64 in Xcode template

Flutter does not yet support armv7 iOS devices. Limit the $ARCHS build
variable to arm64 until then.
2017-02-07 12:04:36 -08:00
Devon Carew
27dc043a39 upgrade to the latest usage package (#7917) 2017-02-07 10:01:44 -08:00
Adam Barth
06f879b57e Add ScrollController.initialScrollOffset (#7916)
Also, move the creation of the ScrollPosition to ScrollController.

Finally, remove TestScrollable in favor of CustomScrollView, which is the
production version of this widget.
2017-02-06 22:15:36 -08:00
Adam Barth
7f2dc47094 Add ScrollController (#7910)
If you pass a ScrollController to a Scrollable2, you can use the controller to
read and write the scroll offset without having to find the Scrollable2State
object.
2017-02-06 17:09:00 -08:00
Michael Goderbauer
9014280f7b Skip TextPainter caret test (#7912)
Reason: https://github.com/flutter/flutter/issues/4273
2017-02-06 16:53:52 -08:00
Ian Hickson
524058f53a The tests should not be platform-specific (#7911) 2017-02-06 16:32:00 -08:00
Adam Barth
2e9986614d Use sliver-based scrolling in more places (#7893)
In particular, we now use ListView in the about dialog.
2017-02-06 16:13:48 -08:00
Adam Barth
c32fa70d9d Add missing @required (#7904)
These arguments are actually required because we assert that they're not null.
2017-02-06 14:50:26 -08:00
Ian Hickson
e46f6e76b3 Provide more const constructors for keys. (#7907) 2017-02-06 14:43:11 -08:00
Adam Barth
57ee52636b Remove old-style grid widgets (#7898)
These widget don't have any clients anymore. Consider using GridView instead.
2017-02-06 10:30:49 -08:00
Ian Hickson
b6aec82e1b AppBar -> PersistentHeader (#7899) 2017-02-06 10:29:26 -08:00
Jacob Richman
53fc96da9e Small Flutter strong mode cleanup fixes. (#7825)
* Small Flutter strong mode cleanup fixes.

These are cases where strong mode down cast composite errors
generally indicated cases that would performance or correctness
issues if Flutter code was run in a strong mode VM.

* Fix Command API so that it is always in terms of Map<String,String>.

* Fix typedef
2017-02-06 08:55:09 -08:00
Michael Goderbauer
82f887de07 Fix Flutter Tools Tests to run on Windows (#7878) 2017-02-05 22:58:49 -08:00
Adam Barth
079db95b80 Switch DatePicker to SliverGrid (#7890)
After this patch, the old grid code is not used in the framework.
2017-02-05 22:01:16 -08:00
Adam Barth
31e2a500f7 Use sliver-based scrolling in more places (#7892)
This patch uses sliver-based two more gallery demos, the stocks example,
in the date picker, and in markdown.
2017-02-05 21:39:24 -08:00
Adam Barth
0bcecef5de Convert ShrineHome to use CustomScrollView (#7887)
This patch converts the Shrine home page to using a sliver-based grid.
This required using a CustomScrollView to mix the block at the top with
the grid below.
2017-02-04 16:43:02 -08:00
Adam Barth
921c0fa5e4 Improve and document SliverGrid delegate structure (#7884)
We now create a GridLayout object that memoizes the layout information
for a given SliverConstraints. This approach is both more efficient
(because the delegate no longer needs to re-solve its layout for each
child) and allows for more code sharing between delegates.

The SliverGridRegularTileLayout will also be useful for the date
picker.

Also, document the grid delegates.
2017-02-04 10:02:13 -08:00
Adam Barth
7f79cced7e Give more control to SliverChildDelegate (#7885)
This patch moves the resonsibility for wrapping repaint boundaries
around children to SliverChildDelegate, which means delegates can choose
whether or no to use repaint boundaries.

Also introduce SliverChildBuilderDelegate to make it easier to use the
builder pattern with sliver lists.

This functionality will be used by date picker, which wants to use a
SliverGrid but doesn't need a repaint boundary around every day in a
month grid.
2017-02-04 09:34:14 -08:00
weisong0
b339c71523 Allow multiple observers for the Navigator and MaterialApp (#7883)
* allow mulitple observers for Navigator and MaterialApp

* add test for the navigator observers

* fix style

* add test for adding/removing a navigator observer
2017-02-04 00:51:32 -08:00
Adam Barth
ff14f35d6d CustomScrollView (#7881)
Also, use CustomScrollView in Shrine and fix a bug with one-line grids
not painting properly due to their reporiting zero paintExtent.
2017-02-03 22:52:25 -08:00
Adam Barth
667424659d Rename SliverLogicalParentData.scrollOffset to layoutOffset (#7871)
This quantity is actually the layoutOffset of the child, not its scroll offset.
2017-02-03 20:47:16 -08:00
Adam Barth
20402ba70a Remove MaxTileWidthGrid (#7875)
This widget has no clients. Please use GridView.extent instead.
2017-02-03 20:08:09 -08:00
Chris Bracken
c7054b302b Improved ensureDirectoryExists error message (#7880) 2017-02-03 18:09:07 -08:00
Chris Bracken
165e96e214 Exit with error message if ensureDirectoryExists fails (#7874)
If ensureDirectoryExists fails -- e.g. because a file file of the same
name as the directory to be created exists, ensure that we exit cleanly
with a useful error message.
2017-02-03 17:34:12 -08:00
Ian Hickson
471e91d46f SliverBlock->SliverList (#7872) 2017-02-03 17:14:00 -08:00
Chris Bracken
d1d943c754 Add isToolExit, throwsToolExit test matchers (#7869)
Allows for better testing of functions that throw ToolExit to bail out.
2017-02-03 16:51:01 -08:00
Adam Barth
f2ea7304c8 PageView shouldn't squish when overscrolled (#7870)
This patch passes down the viewportMainAxisExtent so that RenderSliverPage can
pick it up and size its children appropriately.
2017-02-03 16:43:04 -08:00
Ian Hickson
332a23030b Rename and refactor ScrollView hierarchy (#7865)
This prepares us for a CustomScrollView that takes slivers.
2017-02-03 16:05:43 -08:00
Adam Barth
7fea0593f5 Scrollable2.ensureVisible for box-based viewports (#7868)
This patch makes Scrollable2.ensureVisible with SingleChildScrollView. A future
patch will extend the implementation to work with slivers. (Although the patch
does include some of the infrastructure for that part of the implementation as
well.)
2017-02-03 16:04:41 -08:00
Jason Simmons
883bae074a Roll engine (#7862) 2017-02-03 14:39:16 -08:00
Adam Barth
072cce88d6 Reparameterize Scrollable2 (#7853)
This patch makes a number of changes to how you can configure a
Scrollable2:

 - The ScrollPhysics is now responsible for creating the ScrollPosition.
   You can override the ScrollPhysics by supplying a `physics` argument
   to `Scrollable`, and the new physics you supply will be applied to
   the default physics inherited from the ScrollBehavior.

 - This patch removes the ScrollPosition/AbsoluteScrollPosition split as
   all clients were operating in pixels anyway and the split made the
   code very difficult to follow.

 - ScrollPosition no longer depends directly on Scrollable2State.
   Instead, it depends on an abstract interface that Scrollable2State
   implements. This change has two benefits:

    a) It removes the circular dependency between ScrollPosition and
       Scrollable2State, which lets us split the code for these classes
       (and several other classes that got wrapped up in that cycle) into
       separate libraries for easier maintenance.

    b) ScrollPosition is no longer bound to Scrollable2, which means you
       could use the behavior machinery to drive other sorts of widgets.
       For example, we could use it to drive Scrollabe1 if we wanted.
2017-02-03 14:28:17 -08:00
xster
475e7ce97d Optional general date predicate mechanism (#7858) 2017-02-03 14:27:38 -08:00