From 240e9648d33d1d2fdaee84c18fcadcb6f7121269 Mon Sep 17 00:00:00 2001 From: Alexander Aprelev Date: Tue, 8 Dec 2020 09:53:05 -0800 Subject: [PATCH] Use List.filled constructor instead of soon-to-be-deprecated List constructor (flutter/engine#22925) --- engine/src/flutter/testing/dart/encoding_test.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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++) {