dart
// The InkWell wraps the custom flat button widget.
InkWell
(
// When the user taps the button, show a snackbar.
onTap: () {
ScaffoldMessenger
.
of
(context).
showSnackBar
(
const
SnackBar
(
content:
Text
(
'Tap'
),
));
},
child:
const
Padding
(
padding:
EdgeInsets
.
all
(
12
),
child:
Text
(
'Flat Button'
),
),
)