add mention support

This commit is contained in:
Henry Hiles 2025-12-26 17:00:59 -05:00
commit bbe36ff86f
No known key found for this signature in database
8 changed files with 198 additions and 107 deletions

View file

@ -0,0 +1,26 @@
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 {
final String label;
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,
),
),
backgroundColor: Theme.of(context).colorScheme.primary,
onPressed: () {
// TODO: Open room or join room dialog, or user popover
showAboutDialog(context: context);
},
),
);
}