-
-
Save MarcinusX/b81840b23116882ed7aa5c9dcf138884 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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