Commit Graph

32 Commits

Author SHA1 Message Date
Hixie
03e094aa1b Convert Persistent Bottom Sheets to a Scaffold API
- `Scaffold.of(context).showBottomSheet(widget);`
- Returns an object with .closed Future and .close() method.
- Uses a StateRoute to handle back button.
- Take the Navigator logic out of the BottomSheet widget.
- Support showing a sheet while an old one is going away.
- Add Navigator.remove().
2015-11-20 10:49:10 -08:00
Adam Barth
7b2004b0e9 Convert PointerInputEvent to Duration for timestamp
To make the units clear.
2015-11-17 11:07:50 -08:00
Hixie
d041f3ead5 More resilient Widget tests
- force the time dilation to 1.0 for the Widget tests, so that a local
  change doesn't break all the tests during development.
- add missing license block to all the files.
- set ui.window.onBeginFrame to null when you use WidgetTester, so that
  the engine doesn't trigger any confusing frames after our fake frames.
2015-11-16 12:29:25 -08:00
Ian Hickson
1aa2751ba8 Trivial whitespace fixes. 2015-11-12 22:10:16 -08:00
Hixie
8ab229f89c Make the analyzer actually work.
Turns out that ignoring all error lines that match the empty string is a
poor way to go.

Also, we have to update all the example packages now too, since we
analyze them. So just have travis use our update script.

Also, remove flutter_tools' old travis stuff. It's now part of a bigger
repo.

Also, make travis use the dev Dart SDK, since we need the new analyzer.
Stable is way too out of date, e.g. it still complains about libraries
not having names and mixins using 'super', and the strong mode hints are
even more aggressive than on dev.
2015-11-12 15:41:04 -08:00
Hans Muller
b8286be18d Named parameters for the mock_events.dart TestPointer class 2015-11-11 09:47:06 -08:00
Hans Muller
b4c3970319 Add a unit test for persistent bottom sheets 2015-11-11 08:49:50 -08:00
Adam Barth
3373d0ba01 Switch clients from ui.view to ui.window 2015-10-28 07:16:56 -07:00
Jason Simmons
5b72a2fdaf Fix warnings seen when running skyanalyzer in strong mode 2015-10-15 10:56:03 -07:00
Kris Giesing
ec205ac5c5 Add dart-layer input event abstraction 2015-10-13 15:16:04 -07:00
Adam Barth
ecce1eb389 Import dart:ui as ui (instead of as sky) 2015-10-09 20:55:54 -07:00
Adam Barth
65eba90843 Rename package:sky to package:flutter 2015-10-09 20:44:52 -07:00
Adam Barth
5b37f8750d Rename dart:sky to dart:ui 2015-10-09 19:27:13 -07:00
Adam Barth
56c8e60b04 Detecting just Pan events causes an exception in GestureDetector
Fixes #1320
2015-10-02 15:36:41 -07:00
Adam Barth
fbd5460b04 Integrate WidgetTester with FakeAsync
Fixes #1084
2015-10-01 10:56:58 -07:00
Adam Barth
45c906d2ad Make fn3 the default widget framework 2015-10-01 09:48:35 -07:00
Adam Barth
4525159831 Consolidate widget tests
Now that we've ported all the widget tests to fn3, we don't need a separate fn3
directory.
2015-09-30 18:58:17 -07:00
Adam Barth
a74d02dadf Rename Sky to Flutter in a few more places 2015-09-26 12:46:03 -07:00
Adam Barth
051354ae1d Remove EventDisposition
All the use cases for EventDisposition are now addressed by the gesture
detection system.
2015-09-21 16:45:09 -07:00
Hixie
dfd821e595 Ignore generation of child if child is unchanged
Also:

 - don't mark a node as from the new generation if it is dirty, since we
   know it still has to be built.

 - establish the rule that you can't call setState() during initState()
   or build().

 - make syncChild() return early for unchanged children.

 - update the tests, including adding a new one.
2015-09-15 13:20:37 -07:00
Adam Barth
b356d14635 Introduce package:sky/animation.dart
Move the animation libraries into src/animation and change importers to use
package:sky/animation.dart. Also, move scheduler.dart into the animation
library so that the animation library can be self-contained.
2015-09-08 09:44:01 -07:00
Hans Muller
b02531a9c2 Add Dismissable unit tests 2015-09-04 14:31:03 -07:00
Hans Muller
a69a95df26 Restore PageableList itemsWrap:true
Makes PageableList with itemsWrap:true work again.

Plumbed the itemsWrap parameter through to HomogenousViewport.

Fixes issue #877.
2015-09-02 10:56:19 -07:00
Hans Muller
7a42fe3482 Convert Dismissable to use gestures
Convert Dismissable to use the ScrollStart, ScrollUpdate, and ScrollEnd gestures. Support for fling gestures is TBD.

Included a basic unit test that checks that one item can be dismissed with a press-drag-release gesture.

Fixed the scroll gesture recognizer: if the last pointer goes up and candidate recognizers still exist, then reject the gesture.
2015-08-31 16:44:25 -07:00
Adam Barth
ffc6eaa9bd Add an origin parameter to transforms
This parameter makes it easier to do math when you don't want to center your
tranform at (0, 0).
2015-08-31 13:21:26 -07:00
Adam Barth
bef55951a5 Scrolls should start immediately when possible
If there are no other gestures in the arena, we should kick off the scroll
gesture right away. This change pulled a refactoring of how we dispatch events
to Widgets. Now we dispatch events to Widgets interleaved with their associated
RenderObjects. (Previously we dispatched to all of the RenderObjects first.)
2015-08-29 22:30:49 -07:00
Hixie
fc7943fe06 Test MixedViewport
add/remove/add smoketest
basic vertical behaviour
basic horizontal behaviour
2015-08-28 16:59:10 -07:00
Adam Barth
e99ff36283 Add scroll gestures and use them in Scrollable
This patch replaces the scroll gestures used by Scrollable with ones detected
by the ScrollGestureDetector.
2015-08-28 13:59:46 -07:00
Adam Barth
dc84e882df Use GestureDetector in the framework and examples
We're now using it at the widget layer for everything except scrolling and
flinging.
2015-08-28 10:58:46 -07:00
Adam Barth
95e80663db Add tap, show press, and long press gestures and use tap in IconButton
These gestures use the new gesture detection system.
2015-08-28 10:21:35 -07:00
Eric Seidel
0d4b997008 Add a pageChanged callback to PageableList
Also includes changes to widget_tester sufficient to
test scrolling.

@abarth
2015-08-27 14:51:53 -07:00
Adam Barth
07d96a2314 Rename layout_utils.dart to rendering_tester.dart
Also, rename build_utils.dart to widget_tester.dart. These files are now named
for their most commonly used classes.

Finally, add a .analysis_options to silence the (intentional) analyzer warnings
in append_child_test.dart.
2015-08-26 15:49:04 -07:00