ImageFilter.matrix constructor Null safety

  1. Float64List matrix4,
  2. {FilterQuality filterQuality = FilterQuality.low}

Creates an image filter that applies a matrix transformation.

For example, applying a positive scale matrix (see Matrix4.diagonal3) when used with BackdropFilter would magnify the background image.


factory ImageFilter.matrix(Float64List matrix4,
                   { FilterQuality filterQuality = FilterQuality.low }) {
  assert(matrix4 != null);
  assert(filterQuality != null);
  if (matrix4.length != 16)
    throw ArgumentError('"matrix4" must have 16 entries.');
  return _MatrixImageFilter(data: Float64List.fromList(matrix4), filterQuality: filterQuality);