Skip to content

Instantly share code, notes, and snippets.

@MarcinusX
Created August 25, 2018 09:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MarcinusX/b81840b23116882ed7aa5c9dcf138884 to your computer and use it in GitHub Desktop.
Save MarcinusX/b81840b23116882ed7aa5c9dcf138884 to your computer and use it in GitHub Desktop.
class TapHandler extends StatelessWidget {
final Function(Gender) onGenderTapped;
const TapHandler({Key key, this.onGenderTapped}) : super(key: key);
@override
Widget build(BuildContext context) {
return Row(
mainAxisSize: MainAxisSize.max,
children: <Widget>[
Expanded(child: GestureDetector(onTap: () => onGenderTapped(Gender.female))),
Expanded(child: GestureDetector(onTap: () => onGenderTapped(Gender.other))),
Expanded(child: GestureDetector(onTap: () => onGenderTapped(Gender.male))),
],
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment