[releases] Revert "Minor change type nullability (#112778)" (#113246) (#113399)

This reverts commit 21fab6f960a6fd2702bca2501032dd16f34fe114.

Co-authored-by: Jenn Magder <magder@google.com>
diff --git a/packages/flutter/lib/src/rendering/sliver_list.dart b/packages/flutter/lib/src/rendering/sliver_list.dart
index 34cbc3b..8c5658e 100644
--- a/packages/flutter/lib/src/rendering/sliver_list.dart
+++ b/packages/flutter/lib/src/rendering/sliver_list.dart
@@ -239,7 +239,7 @@
         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) {
diff --git a/packages/flutter/lib/src/rendering/sliver_multi_box_adaptor.dart b/packages/flutter/lib/src/rendering/sliver_multi_box_adaptor.dart
index 7993528..99c8cd6 100644
--- a/packages/flutter/lib/src/rendering/sliver_multi_box_adaptor.dart
+++ b/packages/flutter/lib/src/rendering/sliver_multi_box_adaptor.dart
@@ -481,11 +481,12 @@
   @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) {