fluffychat/lib/pangea/toolbar/widgets/practice_activity/emoji_practice_button.dart
wcjord 379e4a8db9
Reading assistance (#2175)
* still in draft

* feat(reading_assistance): whole message activity oriented

* chore: fix .env file path

* feat: animate selected toolbar into middle of screen

* chore: initial work for message bubble size animation

* refactor(reading_assistance): hooking up the choice interactions and polishing UI

* chore: animate in content and buttons

* formatting

* position reading content relative to selected token

* working on limiting choices

* chore: fix positioning of toolbar animation

* chore: simplify positioning logic

* chore: animate in button height

* getting there

* rough draft with restricted activity number is complete

---------

Co-authored-by: ggurdin <ggurdin@gmail.com>
2025-03-24 15:20:07 -04:00

33 lines
939 B
Dart

import 'package:flutter/material.dart';
import 'package:fluffychat/pangea/emojis/emoji_stack.dart';
import 'package:fluffychat/pangea/events/models/pangea_token_model.dart';
import 'package:fluffychat/pangea/toolbar/widgets/practice_activity/word_zoom_activity_button.dart';
class EmojiPracticeButton extends StatelessWidget {
final PangeaToken token;
final VoidCallback onPressed;
final bool isSelected;
const EmojiPracticeButton({
required this.token,
required this.onPressed,
this.isSelected = false,
super.key,
});
@override
Widget build(BuildContext context) {
final emoji = token.getEmoji();
return WordZoomActivityButton(
icon: emoji.isEmpty
? const Icon(Icons.add_reaction_outlined)
: EmojiStack(
emoji: emoji,
style: const TextStyle(fontSize: 24),
),
isSelected: isSelected,
onPressed: onPressed,
);
}
}