evaluateInitialSeoConfiguratorView function
SeoConfiguratorEvaluation?
evaluateInitialSeoConfiguratorView(
- SeoConfiguratorViewProjection project,
- SeoConfiguratorState state,
- SeoConfiguratorConstraints constraints
Validates an initial state and view before any platform enhancement.
null means the static component must remain untouched. Returned text is
canonicalized with sanitizeSeoConfiguratorText before a builder compares
or an adapter writes it.
Implementation
SeoConfiguratorEvaluation? evaluateInitialSeoConfiguratorView(
SeoConfiguratorViewProjection project,
SeoConfiguratorState state,
SeoConfiguratorConstraints constraints,
) {
final result = evaluateInitialSeoApplication(
state: state,
canonicalizeState: (candidate) =>
isValidSeoConfiguratorState(candidate, constraints) ? candidate : null,
project: project,
validateView: (view, candidate) =>
_validateSeoConfiguratorView(view, candidate, constraints),
);
if (result == null) return null;
return SeoConfiguratorEvaluation(
state: result.state,
view: result.view,
accepted: result.accepted,
);
}