mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Use GestureDetector in the framework and examples
We're now using it at the widget layer for everything except scrolling and flinging.
This commit is contained in:
parent
a3774a757f
commit
dd7e42eeb3
@ -107,19 +107,19 @@ class MineDiggerApp extends App {
|
||||
state = cells[iy][ix] ? CellState.shown : state;
|
||||
}
|
||||
if (state == CellState.covered) {
|
||||
row.add(new Listener(
|
||||
onPointerDown: _pointerDownHandlerFor(ix, iy),
|
||||
onGestureTap: (_) {
|
||||
probe(ix, iy);
|
||||
},
|
||||
onGestureLongPress: (_) {
|
||||
row.add(new GestureDetector(
|
||||
onTap: () => probe(ix, iy),
|
||||
onLongPress: () {
|
||||
activity.userFeedback.performHapticFeedback(activity.HapticFeedbackType_LONG_PRESS);
|
||||
flag(ix, iy);
|
||||
},
|
||||
child: new CoveredMineNode(
|
||||
flagged: false,
|
||||
posX: ix,
|
||||
posY: iy
|
||||
child: new Listener(
|
||||
onPointerDown: _pointerDownHandlerFor(ix, iy),
|
||||
child: new CoveredMineNode(
|
||||
flagged: false,
|
||||
posX: ix,
|
||||
posY: iy
|
||||
)
|
||||
)
|
||||
));
|
||||
// Mutating |hasCoveredCell| here is hacky, but convenient, same
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user