Allow AppBtn.onPressed to be null

This commit is contained in:
Shawn 2023-01-03 10:35:53 -07:00
parent 15e1892589
commit 23cd1b4c71

View File

@ -83,7 +83,7 @@ class AppBtn extends StatelessWidget {
super(key: key);
// interaction:
final VoidCallback onPressed;
final VoidCallback? onPressed;
late final String semanticLabel;
final bool enableFeedback;
@ -128,7 +128,7 @@ class AppBtn extends StatelessWidget {
);
Widget button = TextButton(
onPressed: () => onPressed(),
onPressed: onPressed,
style: style,
child: DefaultTextStyle(
style: DefaultTextStyle.of(context).style.copyWith(color: textColor),