Merge pull request #3130 from pangeachat/3114-vocab-entry-button-not-visible-on-web

chore: in lemma constructs button, don't execute onTap if no points
This commit is contained in:
ggurdin 2025-06-18 10:43:30 -04:00 committed by GitHub
commit 1218f785b6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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: [