setImageFromPixels method

  1. @protected
Future<void> setImageFromPixels(
  1. Id id,
  2. int width,
  3. int height,
  4. Int32List pixels
)

Sets the icon's image, by loading a byte buffer.

The buffer has to be in the format of a 32-bit RGBA image. width and height have to be equal and powers of 2.

Implementation

@protected
Future<void> setImageFromPixels(
    Id id, int width, int height, Int32List pixels) async {
  await _channel.invokeMethod('setImageFromPixels',
      {'id': id, 'pixels': pixels, 'width': width, 'height': height});
}