Canvas constructor

Canvas(
  1. int width,
  2. int height, {
  3. Style style = Style.empty,
  4. bool isOccluded(
    1. int col,
    2. int row
    )?,
  5. CanvasRenderMode renderMode = CanvasRenderMode.braille,
})

Creates a canvas widget of given width and height.

Implementation

Canvas(
  this.width,
  this.height, {
  this.style = Style.empty,
  this.isOccluded,
  this.renderMode = CanvasRenderMode.braille,
}) : _grid = Uint8List(width * height),
     _antiAliased = Uint8List(width * height),
     _styles = List<Style?>.filled(width * height, null);