2
0
mirror of https://gitlab.com/famedly/fluffychat.git synced 2024-12-25 15:02:33 +01:00
fluffychat/lib/pages/chat/chat_emoji_picker.dart

29 lines
846 B
Dart
Raw Normal View History

import 'package:flutter/material.dart';
import 'package:emoji_picker_flutter/emoji_picker_flutter.dart';
import 'package:fluffychat/config/themes.dart';
import 'chat.dart';
class ChatEmojiPicker extends StatelessWidget {
final ChatController controller;
2021-12-13 09:40:53 +01:00
const ChatEmojiPicker(this.controller, {Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return AnimatedContainer(
duration: FluffyThemes.animationDuration,
curve: FluffyThemes.animationCurve,
height: controller.showEmojiPicker
? MediaQuery.of(context).size.height / 2
: 0,
child: controller.showEmojiPicker
? EmojiPicker(
onEmojiSelected: controller.onEmojiSelected,
onBackspacePressed: controller.emojiPickerBackspace,
)
: null,
);
}
}