fluffychat/lib/pages/chat/events/sticker.dart
The one with the braid dc8d77b88f feat: add animated emoji support
- implement animated emoji support in both HTML and Linkify message type
- fix some missing font glyphs
- trim message input

Signed-off-by: The one with the braid <info@braid.business>
2023-11-17 16:50:02 +01:00

41 lines
993 B
Dart

import 'package:flutter/material.dart';
import 'package:adaptive_dialog/adaptive_dialog.dart';
import 'package:flutter_gen/gen_l10n/l10n.dart';
import 'package:matrix/matrix.dart';
import 'package:fluffychat/config/app_config.dart';
import 'image_bubble.dart';
class Sticker extends StatefulWidget {
final Event event;
final Color watermarkColor;
const Sticker(this.event, {super.key, required this.watermarkColor});
@override
StickerState createState() => StickerState();
}
class StickerState extends State<Sticker> {
bool? animated;
@override
Widget build(BuildContext context) {
return ImageBubble(
widget.event,
width: 400,
height: 400,
fit: BoxFit.contain,
onTap: () {
setState(() => animated = true);
showOkAlertDialog(
context: context,
message: widget.event.body,
okLabel: L10n.of(context)!.ok,
);
},
animated: animated ?? AppConfig.autoplayImages,
);
}
}