Commit Graph

16 Commits

Author SHA1 Message Date
Adam Barth
727ce65ffc Add package:flutter_test
This package contains WidgetTester, which is very useful when writing tests for
widgets.
2015-11-23 14:09:12 -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
Adam Barth
2fc5a7597c Add the ability to have translucent gesture detectors
A translucent gesture detector still listens for gestures but also lets the
content visually behind the detector receive events.
2015-11-05 12:47:39 -08:00
Adam Barth
9bc64540c5 Improve hit testing
Now a RenderBox is considered hit if one of its children are hit or it itself
decides that it's hit. In particular, empty space inside a flex won't be hit
because none of the children are located there and a RenderFlex doesn't
consider itself hittable.

Fixes #53
Fixes #1221
2015-11-04 16:51:19 -08:00
Adam Barth
1e446ffc28 Add the position at which drags start
Fixes #1807
2015-10-27 14:25:03 -07:00
Adam Barth
65eba90843 Rename package:sky to package:flutter 2015-10-09 20:44:52 -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
06ffa75919 Convert some tests to fn3 2015-09-25 09:29:04 -07:00
Adam Barth
74f7d9efee Move Drawer to GestureDetector
This fixes an issue in the stocks app in horizontal mode where you could both
scroll and drag the drawer at the same time.
2015-09-16 12:33:51 -07:00
Adam Barth
63101e49bc Fold fling gesture into onDragEnd
That way the fling engages in the same direction as the scroll. For example, if
you have a horizontal scroll nested inside a vertical scroll, the fling will
take place in the same direction as the scroll.
2015-09-10 12:38:11 -07:00
Hans Muller
18e512d3a2 Replace Scroll with Drag in names in GestureRecognizer et al 2015-09-04 16:02:30 -07:00
Hans Muller
952e73583f Fix minor problems in _ScrollGestureRecognizer, Dismissable
Alternating scroll gestures would sometimes be ignored because _ScrollGestureRecognizer didn't always reset its _state when the pointer[s] went up.

A Dismissable dismiss triggered by a drag and then a fling could cause the next attempt to drag-dimiss to fail.

Fixed the definition of lerpColor().
2015-09-03 13:40:35 -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