WT 1.1.14+2 sales page update
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
import 'package:aitrainer_app/model/cache.dart';
|
||||
import 'package:aitrainer_app/model/description.dart';
|
||||
|
||||
class DescriptionRepository {
|
||||
List<Description>? descriptions;
|
||||
|
||||
DescriptionRepository() {
|
||||
this.descriptions = Cache().getDescriptions();
|
||||
}
|
||||
|
||||
String getDescriptionByName(String name) {
|
||||
String descriptionText = "";
|
||||
if (descriptions != null) {
|
||||
this.descriptions!.forEach((element) {
|
||||
print("Desc ${element.name} - $name");
|
||||
if (element.name == name) {
|
||||
descriptionText = element.descriptionTranslation != null ? element.descriptionTranslation! : element.description;
|
||||
}
|
||||
});
|
||||
}
|
||||
return descriptionText;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user