Instantly share code, notes, and snippets.

Embed
What would you like to do?
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