fromBytes static method
Creates a BitmapDescriptor using an array of bytes that must be encoded
as PNG.
On the web, the size
parameter represents the physical size of the
bitmap, regardless of the actual resolution of the encoded PNG.
This helps the browser to render High-DPI images at the correct size.
size
is not required (and ignored, if passed) in other platforms.
Implementation
@Deprecated('Use BitmapDescriptor.bytes method instead.')
static BitmapDescriptor fromBytes(Uint8List byteData, {Size? size}) {
assert(byteData.isNotEmpty,
'Cannot create BitmapDescriptor with empty byteData');
return BytesBitmap(byteData: byteData, size: size);
}