Revert "Minor change type nullability (#112778)" (#113246)

This reverts commit 21fab6f960a6fd2702bca2501032dd16f34fe114.
This commit is contained in:
Jenn Magder 2022-10-10 17:57:56 -07:00 committed by GitHub
parent 883c1fe68c
commit 117407b0fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -239,7 +239,7 @@ class RenderSliverList extends RenderSliverMultiBoxAdaptor {
if (child == null || indexOf(child!) != index) {
// We are missing a child. Insert it (and lay it out) if possible.
child = insertAndLayoutChild(childConstraints,
after: trailingChildWithLayout!,
after: trailingChildWithLayout,
parentUsesSize: true,
);
if (child == null) {

View File

@ -481,11 +481,12 @@ abstract class RenderSliverMultiBoxAdaptor extends RenderSliver
@protected
RenderBox? insertAndLayoutChild(
BoxConstraints childConstraints, {
required RenderBox after,
required RenderBox? after,
bool parentUsesSize = false,
}) {
assert(_debugAssertChildListLocked());
final int index = indexOf(after) + 1;
assert(after != null);
final int index = indexOf(after!) + 1;
_createOrObtainChild(index, after: after);
final RenderBox? child = childAfter(after);
if (child != null && indexOf(child) == index) {