diff --git a/packages/flutter/test/widgets/single_child_scroll_view_test.dart b/packages/flutter/test/widgets/single_child_scroll_view_test.dart index 9f554ee6f3..be96c1ce86 100644 --- a/packages/flutter/test/widgets/single_child_scroll_view_test.dart +++ b/packages/flutter/test/widgets/single_child_scroll_view_test.dart @@ -581,9 +581,9 @@ void main() { children: List.generate(10, (int y) { return Row( children: children[y] = List.generate(10, (int x) { - // nonconst is used below to avoid const constructor and to force a new instance return SizedBox( - height: nonconst(100.0), + key: UniqueKey(), + height: 100.0, width: 100.0, ); }),