initialSeoApprovalChecklistState function
Implementation
SeoApprovalChecklistState? initialSeoApprovalChecklistState({
required int itemCount,
Iterable<int> checkedIndexes = const [],
}) {
if (!_isValidItemCount(itemCount)) return null;
final checked = List<bool>.filled(itemCount, false);
for (final index in checkedIndexes) {
if (index < 0 || index >= itemCount || checked[index]) return null;
checked[index] = true;
}
return SeoApprovalChecklistState(checked: List.unmodifiable(checked));
}