MemoryImage constructor Null safety

const MemoryImage(
  1. Uint8List bytes,
  2. {double scale}
)

Creates an object that decodes a Uint8List buffer as an image.

The arguments must not be null.

Implementation

const MemoryImage(this.bytes, { this.scale = 1.0 })
  : assert(bytes != null),
    assert(scale != null);