setBackgroundColor method

void setBackgroundColor(
  1. Pointer<RendererHandle> renderer,
  2. Color color
)

Sets renderer's clear/background color. Throws FFIException on failure.

Implementation

void setBackgroundColor(Pointer<RendererHandle> renderer, Color color) {
  _guardAlloc('Failed to set background color', (alloc) {
    _generated.setBackgroundColor(renderer.cast(), color.toNative(alloc));
  });
}