don't call getDisplayCopy if category is other
This commit is contained in:
parent
fd7919ac42
commit
5e74507558
2 changed files with 13 additions and 7 deletions
|
|
@ -4493,5 +4493,6 @@
|
|||
"enterLanguageLevel": "Please enter a language level",
|
||||
"enterDiscussionTopic": "Please enter a discussion topic",
|
||||
"selectBotChatMode": "Select chat mode",
|
||||
"messageNotInTargetLang": "Message not in target language"
|
||||
"messageNotInTargetLang": "Message not in target language",
|
||||
"other": "Other"
|
||||
}
|
||||
|
|
@ -55,12 +55,17 @@ class AnalyticsPopupState extends State<AnalyticsPopup> {
|
|||
selectedCategory = category;
|
||||
});
|
||||
|
||||
String categoryCopy(category) =>
|
||||
widget.type.getDisplayCopy(
|
||||
category,
|
||||
context,
|
||||
) ??
|
||||
category;
|
||||
String categoryCopy(category) {
|
||||
if (category.toLowerCase() == "other") {
|
||||
return L10n.of(context)!.other;
|
||||
}
|
||||
|
||||
return widget.type.getDisplayCopy(
|
||||
category,
|
||||
context,
|
||||
) ??
|
||||
category;
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue