Skip to content

Commit 1e8863d

Browse files
committed
Null Safety Migration #3 Part 2
*Migrate clamping scroll behavior.
1 parent 9dd4cb7 commit 1e8863d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/utils/scroll_behavior.dart

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,10 @@ class ClampingScrollBehavior extends ScrollBehavior {
5050
}
5151

5252
class ClampingScrollWrapper extends StatelessWidget {
53-
final Widget? child;
53+
final Widget child;
5454

55-
const ClampingScrollWrapper({Key? key, this.child}) : super(key: key);
55+
const ClampingScrollWrapper({Key? key, required this.child})
56+
: super(key: key);
5657

5758
static Widget builder(BuildContext context, Widget child) {
5859
return ClampingScrollWrapper(child: child);
@@ -62,7 +63,7 @@ class ClampingScrollWrapper extends StatelessWidget {
6263
Widget build(BuildContext context) {
6364
return ScrollConfiguration(
6465
behavior: ClampingScrollBehavior(),
65-
child: child!,
66+
child: child,
6667
);
6768
}
6869
}

0 commit comments

Comments
 (0)