Use List.filled constructor instead of soon-to-be-deprecated List constructor (flutter/engine#22925)

This commit is contained in:
Alexander Aprelev
2020-12-08 09:53:05 -08:00
committed by GitHub
parent 3dfa731239
commit 240e9648d3

View File

@@ -89,7 +89,8 @@ class Square4x4Image {
static List<int> get bytes {
const int bytesPerChannel = 4;
final List<int> result = List<int>(_kWidth * _kWidth * bytesPerChannel);
final List<int> result = List<int>.filled(
_kWidth * _kWidth * bytesPerChannel, 0);
void fillWithColor(Color color, int min, int max) {
for (int i = min; i < max; i++) {