diff --git a/lib/pangea/toolbar/reading_assistance_input_row/practice_match_card.dart b/lib/pangea/toolbar/reading_assistance_input_row/practice_match_card.dart index 183b5cfee..eb1421b15 100644 --- a/lib/pangea/toolbar/reading_assistance_input_row/practice_match_card.dart +++ b/lib/pangea/toolbar/reading_assistance_input_row/practice_match_card.dart @@ -39,6 +39,7 @@ class MatchActivityCard extends StatelessWidget { return Text( choice, style: TextStyle(fontSize: fontSize), + textAlign: TextAlign.center, ); case ActivityTypeEnum.wordFocusListening: return Icon( @@ -99,9 +100,6 @@ class MatchActivityCard extends StatelessWidget { ? cf.choiceContent : null, overlayController: overlayController, - fixedSize: activityType == ActivityTypeEnum.wordMeaning - ? null - : fontSize * 2.1, ), ); }, diff --git a/lib/pangea/toolbar/reading_assistance_input_row/practice_match_item.dart b/lib/pangea/toolbar/reading_assistance_input_row/practice_match_item.dart index a3c844819..d01fc7b0c 100644 --- a/lib/pangea/toolbar/reading_assistance_input_row/practice_match_item.dart +++ b/lib/pangea/toolbar/reading_assistance_input_row/practice_match_item.dart @@ -21,7 +21,6 @@ class PracticeMatchItem extends StatefulWidget { required this.isSelected, this.audioContent, required this.overlayController, - required this.fixedSize, }); final Widget content; @@ -29,7 +28,6 @@ class PracticeMatchItem extends StatefulWidget { final PracticeChoice constructForm; final String? audioContent; final MessageOverlayController overlayController; - final double? fixedSize; final bool? isCorrect; final bool isSelected; @@ -125,25 +123,24 @@ class PracticeMatchItemState extends State { final content = Row( mainAxisSize: MainAxisSize.min, children: [ - Container( - height: widget.fixedSize, - width: widget.fixedSize, - alignment: Alignment.center, - padding: const EdgeInsets.all(8), - decoration: BoxDecoration( - color: color(context).withAlpha((0.4 * 255).toInt()), - borderRadius: BorderRadius.circular(AppConfig.borderRadius), - border: isSelected - ? Border.all( - color: color(context).withAlpha(255), - width: 2, - ) - : Border.all( - color: Colors.transparent, - width: 2, - ), + Flexible( + child: Container( + padding: const EdgeInsets.all(8), + decoration: BoxDecoration( + color: color(context).withAlpha((0.4 * 255).toInt()), + borderRadius: BorderRadius.circular(AppConfig.borderRadius), + border: isSelected + ? Border.all( + color: color(context).withAlpha(255), + width: 2, + ) + : Border.all( + color: Colors.transparent, + width: 2, + ), + ), + child: widget.content, ), - child: widget.content, ), ], );