GestureDetector that handles the

MediaQuery to get the
size of the widget, and divide by 2. (This converts units of “pixels dragged” to
coordinates that

Align uses.) Then, set the

lib/{step1.dart (build) → step2.dart (build)}

@@ -1,8 +1,22 @@

1
1

@override

2
2

Widget build(BuildContext context) {

return Align(

child: Card(

child: widget.child,

+
              var size = MediaQuery.of(context).size;

+
              return GestureDetector(

+
                onPanDown: (details) {},

+
                onPanUpdate: (details) {

+
                  setState(() {