fluffychat/lib/pangea/toolbar/widgets/practice_activity/emoji_practice_button.dart
wcjord 8abf036381
Refactor: Move toolbar content to bottom of screen
Co-authored-by: ggurdin <ggurdin@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: ggurdin <46800240+ggurdin@users.noreply.github.com>
2025-03-06 15:52:07 -05:00

32 lines
866 B
Dart

import 'package:flutter/material.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 == null
? const Icon(Icons.add_reaction_outlined)
: Text(
emoji,
style: const TextStyle(fontSize: 24),
),
isSelected: isSelected,
onPressed: onPressed,
);
}
}