toImageSync method

Image toImageSync()

Return a new Image based on the src of the Sprite.

A sync version of the toImage function. Read Picture.toImageSync for a detailed description of possible benefits in performance.

Implementation

Image toImageSync() {
  final composition = ImageComposition()
    ..add(image, _zeroPosition, source: src);
  return composition.composeSync();
}