image static method

XFile image(
  1. String name, {
  2. int width = 10,
  3. int height = 10,
})

A real, decodable PNG of width by height pixels. The contents are always PNG, whatever extension name has.

Implementation

static XFile image(String name, {int width = 10, int height = 10}) =>
    XFile.fromData(
      _png(width, height),
      path: name,
      name: name,
      mimeType: 'image/png',
      lastModified: DateTime.now(),
    );