add large emoji support
This commit is contained in:
parent
e7462aab57
commit
5857b56d4c
2 changed files with 7 additions and 1 deletions
|
|
@ -14,11 +14,13 @@ import "package:nexus/widgets/chat_page/html/quoted.dart";
|
||||||
|
|
||||||
class Html extends ConsumerWidget {
|
class Html extends ConsumerWidget {
|
||||||
final String html;
|
final String html;
|
||||||
const Html(this.html, {super.key});
|
final TextStyle? textStyle;
|
||||||
|
const Html(this.html, {this.textStyle, super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context, WidgetRef ref) => HtmlWidget(
|
Widget build(BuildContext context, WidgetRef ref) => HtmlWidget(
|
||||||
html,
|
html,
|
||||||
|
textStyle: textStyle,
|
||||||
customWidgetBuilder: (element) {
|
customWidgetBuilder: (element) {
|
||||||
if (element.attributes.keys.contains("data-mx-spoiler")) {
|
if (element.attributes.keys.contains("data-mx-spoiler")) {
|
||||||
return InlineCustomWidget(child: SpoilerText(text: element.text));
|
return InlineCustomWidget(child: SpoilerText(text: element.text));
|
||||||
|
|
|
||||||
|
|
@ -391,6 +391,10 @@ class RoomChat extends HookConsumerWidget {
|
||||||
CrossAxisAlignment.start,
|
CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Html(
|
Html(
|
||||||
|
textStyle:
|
||||||
|
message.metadata?["big"] == true
|
||||||
|
? TextStyle(fontSize: 32)
|
||||||
|
: null,
|
||||||
(message.metadata?["formatted"]
|
(message.metadata?["formatted"]
|
||||||
as String)
|
as String)
|
||||||
.replaceAllMapped(
|
.replaceAllMapped(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue