fluffychat/lib/pangea/toolbar/widgets/message_meaning_button.dart
wcjord e2ca788f81
Add message meaning challenge activity (#1706)
* Add message meaning mode to toolbar

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: ggurdin <46800240+ggurdin@users.noreply.github.com>
Co-authored-by: ggurdin <ggurdin@gmail.com>
2025-02-06 17:03:21 -05:00

43 lines
1.3 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,
),
secondChild: Container(
width: buttonSize,
height: buttonSize,
alignment: Alignment.center,
child: Icon(
MessageMode.messageMeaning.icon,
color: AppConfig.gold,
size: buttonSize,
),
),
);
}
}