Created
October 10, 2021 14:50
-
-
Save diamantidis/a3d38555970aee04335f8cad8f1a426c to your computer and use it in GitHub Desktop.
This file contains hidden or 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 SectionLink extends StatelessWidget { | |
final Section section; | |
final void Function(Section) onTap; | |
const SectionLink({Key? key, required this.section, required this.onTap}) | |
: super(key: key); | |
@override | |
Widget build(BuildContext context) { | |
return InkWell( | |
onTap: () => onTap(section), | |
child: Padding( | |
padding: const EdgeInsets.all(8.0), | |
child: Text( | |
section.title, | |
style: Theme.of(context) | |
.textTheme | |
.headline3 | |
?.copyWith(color: Colors.black87, fontWeight: FontWeight.bold), | |
), | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment