getDefinition method
Implementation
@override
Future<ScreenDefinition> getDefinition(
{String? screenId, String? screenName}) async {
String? content;
if (screenId != null) {
content = hostCache[_getCacheKey(screenId)];
} else if (screenName != null) {
final screenId = appModel.screenNameMappings[screenName];
if (screenId != null) {
content = hostCache[_getCacheKey(screenId)];
}
} else if (appModel.homeMapping != null) {
content = hostCache[_getCacheKey(appModel.homeMapping!)];
}
return content != null
? ScreenDefinition(loadYaml(content))
: ScreenDefinition(YamlMap());
}