fix: restrict width of morph icon in practice token button

This commit is contained in:
ggurdin 2025-12-18 12:04:03 -05:00
parent 6c50521aa9
commit 048fab59bd
No known key found for this signature in database
GPG key ID: A01CB41737CBB478
2 changed files with 6 additions and 2 deletions

View file

@ -36,8 +36,8 @@ class MultipleChoiceActivity {
Map<String, dynamic> toJson() {
return {
'choices': choices,
'answer': answers,
'choices': List.from(choices),
'answer': List.from(answers),
};
}

View file

@ -80,6 +80,7 @@ class TokenPracticeButton extends StatelessWidget {
token: token,
target: _activity,
emojiStyle: _emojiStyle,
width: tokenButtonHeight,
);
} else if (practiceMode == MessagePracticeMode.wordMorph) {
child = _MorphMatchButton(
@ -244,12 +245,14 @@ class _NoActivityContentButton extends StatelessWidget {
final PangeaToken token;
final PracticeTarget? target;
final TextStyle emojiStyle;
final double width;
const _NoActivityContentButton({
required this.practiceMode,
required this.token,
required this.target,
required this.emojiStyle,
required this.width,
});
@override
@ -278,6 +281,7 @@ class _NoActivityContentButton extends StatelessWidget {
context: context,
),
child: SizedBox(
width: width,
child: Center(
child: MorphIcon(
morphFeature: morphFeature,