create static method

Future<ImageTexture> create(
  1. Image image
)

Create a ImageTexture from the given image.

Implementation

static Future<ImageTexture> create(Image image) async {
  final Image(:toByteData, :width, :height) = image;
  return ImageTexture((await toByteData())!, width: width, height: height);
}