1. override
void fillPattern(GraphicsPattern pattern)

Source

@override
void fillPattern(GraphicsPattern pattern) {
  // TODO: Currently fillPattern is only supported in Canvas2D
  this.fillColor(0xFFFF00FF);
}