BitmapData(num width, num height, [ int fillColor = 0xFFFFFFFF, num pixelRatio = 1.0 ])

Source

factory BitmapData(num width, num height, [int fillColor = 0xFFFFFFFF, num pixelRatio = 1.0]) {
  int textureWidth = (width * pixelRatio).round();
  int textureHeight = (height * pixelRatio).round();
  var renderTexture = new RenderTexture(textureWidth, textureHeight, fillColor);
  var renderTextureQuad = renderTexture.quad.withPixelRatio(pixelRatio);
  return new BitmapData.fromRenderTextureQuad(renderTextureQuad);
}