chore: in lemma constructs button, don't execute onTap if no points

This commit is contained in:
ggurdin 2025-06-18 10:43:00 -04:00
parent 0500163f15
commit 16db460ae2
No known key found for this signature in database
GPG key ID: A01CB41737CBB478

View file

@ -91,7 +91,7 @@ class ConstructXpWidgetState extends State<ConstructXpWidget>
Stream<AnalyticsStreamUpdate> get stream =>
MatrixState.pangeaController.getAnalytics.analyticsStream.stream;
Widget get svg => constructLemmaCategory?.icon() ?? const SizedBox();
Widget? get svg => constructLemmaCategory?.icon();
@override
void dispose() {
@ -106,9 +106,10 @@ class ConstructXpWidgetState extends State<ConstructXpWidget>
width: widget.size,
height: widget.size,
child: GestureDetector(
onTap: widget.onTap,
onTap: svg != null ? widget.onTap : null,
child: MouseRegion(
cursor: SystemMouseCursors.click,
cursor:
svg != null ? SystemMouseCursors.click : SystemMouseCursors.basic,
child: Stack(
alignment: Alignment.center,
children: [