Skip to content

Instantly share code, notes, and snippets.

@AlabasterAxe
Created November 10, 2020 00:02
Show Gist options
  • Select an option

  • Save AlabasterAxe/a1b17f9ad4813b4f365c91fe8d224545 to your computer and use it in GitHub Desktop.

Select an option

Save AlabasterAxe/a1b17f9ad4813b4f365c91fe8d224545 to your computer and use it in GitHub Desktop.
Listen for taps to trigger the dinosaur's jump.
return Scaffold(
appBar: AppBar(
title: Text(widget.title),
),
body: GestureDetector(
behavior: HitTestBehavior.translucent,
onTap: () {
dino.jump();
},
child: Stack(
alignment: Alignment.center,
children: children,
),
),
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment