bytes static method

BytesMapBitmap bytes(
  1. Uint8List byteData, {
  2. double? imagePixelRatio,
  3. double? width,
  4. double? height,
  5. MapBitmapScaling bitmapScaling = MapBitmapScaling.auto,
})

Creates a BitmapDescriptor from byte data using BytesMapBitmap.

This method wraps BytesMapBitmap constructor for ease of use within the context of creating BitmapDescriptor instances.

byteData is the PNG-encoded image data. imagePixelRatio controls the scale of the image relative to the device's pixel ratio. It defaults to the natural resolution if not specified. The value is ignored if width or height is provided. width and height can optionally control the dimensions of the rendered image.

See BytesMapBitmap for more information on the parameters.

Returns a new BytesMapBitmap instance.

Implementation

static BytesMapBitmap bytes(
  Uint8List byteData, {
  double? imagePixelRatio,
  double? width,
  double? height,
  MapBitmapScaling bitmapScaling = MapBitmapScaling.auto,
}) {
  return BytesMapBitmap(
    byteData,
    imagePixelRatio: imagePixelRatio,
    width: width,
    height: height,
    bitmapScaling: bitmapScaling,
  );
}