7278 Commits

Author SHA1 Message Date
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
Adam Barth
652e9c7aa3 Make kPestoRecipes a constant (#7886)
Someone on stack overflow was mutating the list of recipes and getting
confused about why the UI didn't redraw. Making kPestoRecipes a constant
might help avoid that confusion.
2017-02-04 09:33:56 -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
Ian Hickson
be7be2b8b6 Test service extensions (#7849)
...and fix bugs that the tests uncovered.

WRITE TEST FIND BUG
2017-02-03 13:55:07 -08:00
Chris Bracken
cce70d7069 Improved error message for iOS device on a non-Mac host (#7859)
And fix some un-grammatical language below.
2017-02-03 12:54:07 -08:00
Chris Bracken
fb72f21cdc Improved detection of unsupported iOS devices (#7857)
* Detects iPad 2 and iPad Retina as unsupported devices.
* Simplifies blacklisting logic.
* Minor improvements to error messages.
* Added unit tests.
2017-02-03 12:25:05 -08:00
Chris Bracken
104fcf8d08 Fix typos, quote consistency (#7856) 2017-02-03 11:50:49 -08:00
Adam Barth
2ec02c3395 Remove Scrollable2.initialScrollOffset (#7842)
This property is wired up to anything and it isn't used. We'll need to find a
better way for clients to control the scroll offset.
2017-02-03 11:18:47 -08:00
Chris Bracken
acc7d110c0 Subclass FlutterAppDelegate in iOS examples (#7847)
Subclassing FlutterAppDelegate is not required for real-world apps, but
it's what 'flutter create' generates, and applies the default behaviours
that most real-world apps will want.
2017-02-02 18:38:48 -08:00
Chris Bracken
aaff608d05 Use FlutterAppDelegate in iOS create template (#7845)
On iOS, generate a FlutterAppDelegate subclass for the application
delegate. This avoids touchesBegan:withEvent boilerplate to handle
status bar taps.
2017-02-02 18:03:56 -08:00
Chris Bracken
484067edd7 Roll engine to c354127d4dfd2b960a6fa7ca173d65cb005801fa (#7843) 2017-02-02 17:33:55 -08:00
Adam Barth
f56c5a3651 Move ViewportOffset to its own file (#7840)
There aren't any interdependencies with the rest of sliver.dart, and that file
is already quite complex.
2017-02-02 17:02:29 -08:00
Adam Barth
3231465769 Add PageView (#7809)
This widget is a start towards replacing PageableList. There are still a number
of features that we'll need to add before this widget can replace PageableList.
2017-02-02 16:16:20 -08:00
Adam Barth
3831e0b06d Update IML files (#7835)
IntelliJ seems to really want these files to have these changes.
2017-02-02 15:54:11 -08:00
Ian Hickson
dc634e195e Introduce the concept of asynchronicity to the service extensions. (#7823)
This allows us, for example, to wait for the slow mode banner to have
been removed from the screen before triggering a screen shot.
2017-02-02 15:48:35 -08:00
Michael Goderbauer
a742a5ddf6 Make flutter analyze run on Windows (#7828) 2017-02-02 15:41:13 -08:00
Hans Muller
e366c9691f protect the hasScopedWillPopCallback ModalRoute method (#7832) 2017-02-02 15:27:39 -08:00
Ian Hickson
cedc74503a Add a flag that shows a banner for old Scrollables (#7819)
Also, tweak Banner a bit so you can set the color and text style.
Also, cache the text painter between paints.
2017-02-02 14:52:49 -08:00
Ian Hickson
5928d221d4 ShrinkWrap Viewport (#7790) 2017-02-02 14:50:04 -08:00
Chris Bracken
2bbc028313 Add touchesBegan handler to iOS AppDelegate template (#7822)
By default, pass status bar taps to the root view controller in
generated Flutter apps. Developers should customise as necesary if they
later create one or more alternate FlutterViewControllers that they'd
like to forward these to.
2017-02-02 12:50:01 -08:00
Jason Simmons
d2a1e125e9 Do not print logs whose timestamp is equal to the last timestamp seen (#7827)
If the tool is started immediately after a previous run of the tool, then
the most recent log timestamp may come from the previous run's logs.
The new instance of the tool should not print those logs.

This was happening during runs of the microbenchmark script.
2017-02-02 12:48:53 -08:00
xster
959db13c04 Prevent out of bound date picker selections (#7773)
- Out of bound days are disabled and untappable
- Out of bounds months can't be navigated to
2017-02-02 11:30:32 -08:00
Michael Goderbauer
4c0fdc02ea Roll Engine to b8d144dab8b5e597017b76b019523aa73d56ef44 (#7820)
With this commit `flutter run --release` and `flutter run --profile` is fully supported on Windows.
2017-02-02 10:49:07 -08:00
Luke
646d7404cb Fix issues with flutter doctor (#7808)
* fix issue detecting ios-deploy. fix issue matching IntelliJ Ultimate on Mac

* refactor directory navigation code
2017-02-02 00:19:10 -08:00
Mikkel Nygaard Ravn
f460309354 Added Widgets that interact with asynchronous computations (#7733)
Added three widgets that interact with Futures and Streams.
2017-02-02 08:35:36 +01:00
Adam Barth
8b4aed1720 Fix copy/pasta ConstrainedBox docs (#7795)
Fixes #7788
2017-02-01 23:14:05 -08:00
Ian Hickson
6dcd127188 Delay time dilation so users see the checkbox (#7803)
Fixes https://github.com/flutter/flutter/issues/5066
2017-02-01 22:48:00 -08:00