Created
June 7, 2021 19:03
-
-
Save luizmarcus/7a1f6579716f33688551d7334f9d32ec 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
Widget _getItem(IconData iconData, String name, String tag) => | |
GestureDetector( | |
child: Card( | |
child: Padding( | |
padding: const EdgeInsets.all(10.0), | |
child: Row( | |
children: [ | |
Hero(child: Icon(iconData), tag: tag), | |
Expanded( | |
child: Text( | |
name, | |
textAlign: TextAlign.center, | |
), | |
), | |
], | |
), | |
), | |
), | |
onTap: () => Navigator.push( | |
context, | |
PageRouteBuilder( | |
transitionDuration: Duration(seconds: 2), | |
pageBuilder: (_, __, ___) => SecondPage( | |
iconData: iconData, | |
tag: tag, | |
text: name, | |
), | |
), | |
), | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment