assertTranslationsValid static method
Verifies that all translation have the same templated values (if so).
Implementation
static bool assertTranslationsValid(List<Translation> translations) {
if (translations.length > 1) {
final templatedValues = translations.first.templatedValues;
for (var i = 1; i < translations.length; i++) {
final current = translations[i];
if (!const SetEquality()
.equals(templatedValues.toSet(), current.templatedValues.toSet())) {
return false;
}
}
}
return true;
}