diff --git a/lib/pages/chat_list/chat_list.dart b/lib/pages/chat_list/chat_list.dart index 6ffb3dabd..985d2c238 100644 --- a/lib/pages/chat_list/chat_list.dart +++ b/lib/pages/chat_list/chat_list.dart @@ -43,7 +43,6 @@ import '../../widgets/matrix.dart'; import 'package:fluffychat/utils/tor_stub.dart' if (dart.library.html) 'package:tor_detector_web/tor_detector_web.dart'; - enum PopupMenuAction { settings, invite, diff --git a/lib/pangea/choreographer/widgets/igc/span_card.dart b/lib/pangea/choreographer/widgets/igc/span_card.dart index d6c32a98c..64bb7ee3a 100644 --- a/lib/pangea/choreographer/widgets/igc/span_card.dart +++ b/lib/pangea/choreographer/widgets/igc/span_card.dart @@ -19,7 +19,6 @@ import '../../../common/controllers/pangea_controller.dart'; import '../../enums/span_choice_type.dart'; import '../../models/span_card_model.dart'; import '../choice_array.dart'; -import 'card_header.dart'; import 'why_button.dart'; //switch for definition vs correction vs practice @@ -227,13 +226,13 @@ class WordMatchContent extends StatelessWidget { return Column( children: [ // if (!controller.widget.scm.pangeaMatch!.isITStart) - CardHeader( - text: controller.error?.toString() ?? matchCopy.title, - botExpression: controller.error == null - ? controller.currentExpression - : BotExpression.addled, - onClose: () => controller.widget.scm.choreographer.setState(), - ), + // CardHeader( + // text: controller.error?.toString(), + // botExpression: controller.error == null + // ? controller.currentExpression + // : BotExpression.addled, + // onClose: () => controller.widget.scm.choreographer.setState(), + // ), Scrollbar( controller: scrollController, thumbVisibility: true, @@ -409,10 +408,11 @@ class PromptAndFeedback extends StatelessWidget { ), ), if (controller.selectedChoice != null) ...[ - Text( - controller.selectedChoice!.feedbackToDisplay(context), - style: BotStyle.text(context), - ), + if (controller.selectedChoice?.feedback != null) + Text( + controller.selectedChoice!.feedbackToDisplay(context), + style: BotStyle.text(context), + ), const SizedBox(height: 8), if (controller.selectedChoice?.feedback == null) WhyButton( @@ -429,7 +429,9 @@ class PromptAndFeedback extends StatelessWidget { Text( controller.widget.scm.pangeaMatch!.match.type.typeName .defaultPrompt(context), - style: BotStyle.text(context), + style: BotStyle.text(context).copyWith( + fontStyle: FontStyle.italic, + ), ), ], ), diff --git a/lib/pangea/choreographer/widgets/igc/why_button.dart b/lib/pangea/choreographer/widgets/igc/why_button.dart index ce8053ad7..a45946ecf 100644 --- a/lib/pangea/choreographer/widgets/igc/why_button.dart +++ b/lib/pangea/choreographer/widgets/igc/why_button.dart @@ -1,7 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:flutter_gen/gen_l10n/l10n.dart'; - class WhyButton extends StatelessWidget { const WhyButton({ super.key, @@ -14,44 +12,15 @@ class WhyButton extends StatelessWidget { @override Widget build(BuildContext context) { - return TextButton( + return IconButton( onPressed: loading ? null : onPress, - style: ButtonStyle( - backgroundColor: WidgetStateProperty.all( - Theme.of(context).colorScheme.primary.withAlpha(25), - ), - shape: WidgetStateProperty.all( - RoundedRectangleBorder( - borderRadius: BorderRadius.circular(10), // Border radius - side: BorderSide( - color: Theme.of(context) - .colorScheme - .primary, // Replace with your color - style: BorderStyle.solid, - width: 2.0, - ), - ), - ), - ), - child: SizedBox( - width: 150, - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - if (!loading) const Icon(Icons.lightbulb_outline), - if (loading) - const Center( - child: SizedBox( - width: 24.0, - height: 24.0, - child: CircularProgressIndicator(), - ), - ), - const SizedBox(width: 8), - Text(L10n.of(context).why), - ], - ), - ), + icon: loading + ? const SizedBox( + width: 24, + height: 24, + child: CircularProgressIndicator(), + ) + : const Icon(Icons.lightbulb_outline, size: 24), ); } }