getBackground method
- String id
Implementation
BackgroundDefinition? getBackground(String id) {
try {
final data = getAsset('$kPackBackgroundsPath/$id.json');
if (data == null) return null;
final content = utf8.decode(data);
return BackgroundDefinitionMapper.fromJson(content);
} catch (_) {
return null;
}
}