diff --git a/engine/src/flutter/testing/dart/encoding_test.dart b/engine/src/flutter/testing/dart/encoding_test.dart index c33b7cecb2..8afca090fa 100644 --- a/engine/src/flutter/testing/dart/encoding_test.dart +++ b/engine/src/flutter/testing/dart/encoding_test.dart @@ -89,7 +89,8 @@ class Square4x4Image { static List get bytes { const int bytesPerChannel = 4; - final List result = List(_kWidth * _kWidth * bytesPerChannel); + final List result = List.filled( + _kWidth * _kWidth * bytesPerChannel, 0); void fillWithColor(Color color, int min, int max) { for (int i = min; i < max; i++) {