GestureDetector({Key Key, this.child, this.ontap,---- click ----Function()-- this.ontapdown,---- press: Function(TapDownDetails details)-- this.onTapUp,---- lift: Function(TapUpDetails details)---- this.onTapCancel,---- Cancel (when onTap cannot trigger) : The Function () - this onDoubleTap, - double-click - void Function () - this. OnLongPress, - long-press - void Function () - This.onlongpressup,---- Hold down to release ----void Function()---- this.onverticalDragdown,---- Drag vertically press ----Function(DragDownDetails) Details) - this. OnVerticalDragStart, -- -- vertical drag - Function (DragStartDetails details) - Enclosing onVerticalDragUpdate - vertical drag update - Function (DragUpdateDetails details) - This. onVerticalDragEnd,---- vertical drag end ----Function(DragEndDetails details)---- This onVerticalDragCancel, - vertical drag cancelled - Function () - this. OnHorizontalDragDown, enclosing onHorizontalDragStart, this.onHorizontalDragUpdate, this.onHorizontalDragEnd, this.onHorizontalDragCancel, this.onPanDown, this.onPanStart, this.onPanUpdate, this.onPanEnd, this.onPanCancel, this.onScaleStart, this.onScaleUpdate, this.onScaleEnd, this.behavior, this.excludeFromSemantics =false

 
Copy the code

About to jump

Forward mode 1: Add routes

return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.lightBlue,
),
home: new CanvasPage(),
routes: <String, WidgetBuilder> {
'/clock': (BuildContext context) => ClockPage(),
},);
Copy the code

// Jump method:

Navigator.of(context).pushNamed(‘/clock’);

Jump mode 2: Directly open the control

Navigator.push(context,MaterialPageRoute(builder: (bu) => ClockPage()));

Closing mode:

Navigator.pop(context);