Make Draggable use gestures

Draggable is now itself a gesture arena member. This means it won't
conflict with other gesture recognisers in the same path.

This also allows variants of Draggable that are triggered by other
gestures.

Also, some cleanup of DoubleTapGestureRecognizer, GestureDetector, and
PrimaryPointerGestureRecognizer.

Also, make MultiTapGestureRecognizer support a timeout for longpress.

Also, make Draggable data be typed.

Also, hide warnings about constructor warnings for now. Analyzer doesn't
support them yet. (Have to do this on a per-line basis)

Directions for future research:
 - animating the avatar (enter/exit transitions)
 - interaction with the navigator (canceling a drag on page navigation, etc)
 - double-tap draggable
This commit is contained in:
Hixie
2015-11-04 10:28:13 -08:00
parent 1fb369b4a5
commit 0fcf6028bf

View File

@@ -40,6 +40,9 @@ _IGNORED_PATTERNS = [
re.compile(r'^\[hint\] \(toText == toPlainText\) \? toStyledText : toPlainText has inferred type \(String, String\) → Widget \(.+styled_text.dart,.+\)'),
re.compile(r'^\[hint\] .+ [?:] \([_, ]+\) .+ has inferred type .+'),
# analyzer doesn't support constructor tear-offs yet
re.compile(r'.+/examples/widgets/drag_and_drop.dart, line 8[03], col .+'),
# Disable the lint checks that will be caught by code review
re.compile(r'^\[lint\] Avoid defining a one-member abstract class when a simple function will do'),
re.compile(r'^\[lint\] Prefer using lowerCamelCase for constant names\.'),