resolve method
Implementation
CountdownHeaderContent? resolve(VariableScope variables) {
final resolvedTitle = variables.resolve(title).trim();
final resolvedSubtitle = variables.resolve(subtitle).trim();
final resolvedImageUrl = variables.resolve(imageUrl ?? '').trim();
if (resolvedTitle.isEmpty ||
resolvedSubtitle.isEmpty ||
!_isOptionalHttpUrl(resolvedImageUrl)) {
return null;
}
return CountdownHeaderContent(
title: resolvedTitle,
subtitle: resolvedSubtitle,
imageUrl: resolvedImageUrl.isEmpty ? null : resolvedImageUrl,
imagePlaceholder: imagePlaceholder,
);
}