Fix inline widgets

This commit is contained in:
Henry Hiles 2025-12-26 17:24:02 -05:00
commit 3ab8451a64
No known key found for this signature in database
7 changed files with 40 additions and 33 deletions

View file

@ -1,5 +1,4 @@
import "package:flutter/material.dart";
import "package:flutter_widget_from_html_core/flutter_widget_from_html_core.dart";
import "package:matrix/matrix.dart";
class MentionChip extends StatelessWidget {
@ -7,20 +6,18 @@ class MentionChip extends StatelessWidget {
const MentionChip(this.label, {super.key});
@override
Widget build(BuildContext context) => InlineCustomWidget(
child: ActionChip(
label: Text(
label.parseIdentifierIntoParts()?.primaryIdentifier ?? label,
style: TextStyle(
fontWeight: FontWeight.bold,
color: Theme.of(context).colorScheme.onPrimary,
),
Widget build(BuildContext context) => ActionChip(
label: Text(
label.parseIdentifierIntoParts()?.primaryIdentifier ?? label,
style: TextStyle(
fontWeight: FontWeight.bold,
color: Theme.of(context).colorScheme.onPrimary,
),
backgroundColor: Theme.of(context).colorScheme.primary,
onPressed: () {
// TODO: Open room or join room dialog, or user popover
showAboutDialog(context: context);
},
),
backgroundColor: Theme.of(context).colorScheme.primary,
onPressed: () {
// TODO: Open room or join room dialog, or user popover
showAboutDialog(context: context);
},
);
}