|
|
|
|
@ -186,11 +186,18 @@ class UserInstructions {
|
|
|
|
|
bool showedBlurMeansTranslate;
|
|
|
|
|
bool showedTooltipInstructions;
|
|
|
|
|
|
|
|
|
|
bool showedSpeechToTextTooltip;
|
|
|
|
|
bool showedL1TranslationTooltip;
|
|
|
|
|
bool showedTranslationChoicesTooltip;
|
|
|
|
|
|
|
|
|
|
UserInstructions({
|
|
|
|
|
this.showedItInstructions = false,
|
|
|
|
|
this.showedClickMessage = false,
|
|
|
|
|
this.showedBlurMeansTranslate = false,
|
|
|
|
|
this.showedTooltipInstructions = false,
|
|
|
|
|
this.showedSpeechToTextTooltip = false,
|
|
|
|
|
this.showedL1TranslationTooltip = false,
|
|
|
|
|
this.showedTranslationChoicesTooltip = false,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
factory UserInstructions.fromJson(Map<String, dynamic> json) =>
|
|
|
|
|
@ -203,6 +210,12 @@ class UserInstructions {
|
|
|
|
|
json[InstructionsEnum.blurMeansTranslate.toString()] ?? false,
|
|
|
|
|
showedTooltipInstructions:
|
|
|
|
|
json[InstructionsEnum.tooltipInstructions.toString()] ?? false,
|
|
|
|
|
showedL1TranslationTooltip:
|
|
|
|
|
json[InlineInstructions.l1Translation.toString()] ?? false,
|
|
|
|
|
showedTranslationChoicesTooltip:
|
|
|
|
|
json[InlineInstructions.translationChoices.toString()] ?? false,
|
|
|
|
|
showedSpeechToTextTooltip:
|
|
|
|
|
json[InlineInstructions.speechToText.toString()] ?? false,
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
Map<String, dynamic> toJson() {
|
|
|
|
|
@ -213,6 +226,12 @@ class UserInstructions {
|
|
|
|
|
showedBlurMeansTranslate;
|
|
|
|
|
data[InstructionsEnum.tooltipInstructions.toString()] =
|
|
|
|
|
showedTooltipInstructions;
|
|
|
|
|
data[InlineInstructions.l1Translation.toString()] =
|
|
|
|
|
showedL1TranslationTooltip;
|
|
|
|
|
data[InlineInstructions.translationChoices.toString()] =
|
|
|
|
|
showedTranslationChoicesTooltip;
|
|
|
|
|
data[InlineInstructions.speechToText.toString()] =
|
|
|
|
|
showedSpeechToTextTooltip;
|
|
|
|
|
return data;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -238,6 +257,21 @@ class UserInstructions {
|
|
|
|
|
?.content[InstructionsEnum.tooltipInstructions.toString()]
|
|
|
|
|
as bool?) ??
|
|
|
|
|
false,
|
|
|
|
|
showedL1TranslationTooltip:
|
|
|
|
|
(accountData[InlineInstructions.l1Translation.toString()]
|
|
|
|
|
?.content[InlineInstructions.l1Translation.toString()]
|
|
|
|
|
as bool?) ??
|
|
|
|
|
false,
|
|
|
|
|
showedTranslationChoicesTooltip: (accountData[
|
|
|
|
|
InlineInstructions.translationChoices.toString()]
|
|
|
|
|
?.content[InlineInstructions.translationChoices.toString()]
|
|
|
|
|
as bool?) ??
|
|
|
|
|
false,
|
|
|
|
|
showedSpeechToTextTooltip:
|
|
|
|
|
(accountData[InlineInstructions.speechToText.toString()]
|
|
|
|
|
?.content[InlineInstructions.speechToText.toString()]
|
|
|
|
|
as bool?) ??
|
|
|
|
|
false,
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|