mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-12-26 16:12:37 +01:00
3e80e3f67e
- adds Emoji autocomplete following popular `:` hotkey - adds Famedly's famous smart Emojis (tm) - syncs recent Emojis with SDK Signed-off-by: TheOneWithTheBraid <the-one@with-the-braid.cf>
29 lines
886 B
Dart
29 lines
886 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
import 'package:emoji_picker_flutter/emoji_picker_flutter.dart';
|
|
|
|
import 'package:fluffychat/utils/fluffy_emoji_picker.dart';
|
|
import 'chat.dart';
|
|
|
|
class ChatEmojiPicker extends StatelessWidget {
|
|
final ChatController controller;
|
|
const ChatEmojiPicker(this.controller, {Key? key}) : super(key: key);
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return AnimatedContainer(
|
|
duration: const Duration(milliseconds: 300),
|
|
height: controller.showEmojiPicker
|
|
? MediaQuery.of(context).size.height / 2
|
|
: 0,
|
|
child: controller.showEmojiPicker
|
|
? EmojiPicker(
|
|
onEmojiSelected: controller.onEmojiSelected,
|
|
onBackspacePressed: controller.emojiPickerBackspace,
|
|
customWidget: (c, s) => FluffyEmojiPickerView(c, s),
|
|
)
|
|
: null,
|
|
);
|
|
}
|
|
}
|