debugAssertChildListIsNonEmptyAndContiguous method
Asserts that the reified child list is not empty and has a contiguous sequence of indices.
Always returns true.
Implementation
bool debugAssertChildListIsNonEmptyAndContiguous(_PopUpList? popUpList) {
assert(() {
final list = listOf(popUpList)!;
assert(list.firstChild != null);
var index = indexOf(list.firstChild!);
var child = childAfter(list.firstChild!);
while (child != null) {
index += 1;
assert(indexOf(child) == index);
child = childAfter(child);
}
return true;
}());
return true;
}