From 23cd1b4c712036d5037b0180d0b07b0f41a2e1bc Mon Sep 17 00:00:00 2001 From: Shawn Date: Tue, 3 Jan 2023 10:35:53 -0700 Subject: [PATCH] Allow AppBtn.onPressed to be null --- lib/ui/common/controls/buttons.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ui/common/controls/buttons.dart b/lib/ui/common/controls/buttons.dart index 4300bc30..dc2e6290 100644 --- a/lib/ui/common/controls/buttons.dart +++ b/lib/ui/common/controls/buttons.dart @@ -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),