nexus/lib/widgets/chat_page/html/mention_chip.dart
2026-01-15 20:03:36 -05:00

25 lines
728 B
Dart

import "package:flutter/material.dart";
import "package:matrix/matrix.dart";
class MentionChip extends StatelessWidget {
final String label;
const MentionChip(this.label, {super.key});
@override
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: () => showDialog(
context: context,
builder: (_) => Dialog(
child: Text("TODO: Open room or join room dialog, or user popover"),
), // TODO
),
);
}