fluffychat/lib/pangea/toolbar/widgets/message_meaning_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

44 lines
1.4 KiB
Dart

import 'package:flutter/material.dart';
import 'package:fluffychat/config/app_config.dart';
import 'package:fluffychat/config/themes.dart';
import 'package:fluffychat/pangea/toolbar/enums/message_mode_enum.dart';
import 'package:fluffychat/pangea/toolbar/widgets/message_selection_overlay.dart';
import 'package:fluffychat/pangea/toolbar/widgets/toolbar_button.dart';
class MessageMeaningButton extends StatelessWidget {
final MessageOverlayController overlayController;
final double buttonSize;
const MessageMeaningButton({
super.key,
required this.overlayController,
required this.buttonSize,
});
@override
Widget build(BuildContext context) {
return AnimatedCrossFade(
crossFadeState: overlayController.isPracticeComplete
? CrossFadeState.showSecond
: CrossFadeState.showFirst,
duration: FluffyThemes.animationDuration,
firstChild: ToolbarButton(
mode: MessageMode.messageMeaning,
overlayController: overlayController,
buttonSize: buttonSize,
onPressed: overlayController.updateToolbarMode,
),
secondChild: Container(
width: buttonSize,
height: buttonSize,
alignment: Alignment.center,
child: Icon(
MessageMode.messageMeaning.icon,
color: AppConfig.gold,
size: buttonSize,
),
),
);
}
}