createRenderer method
Creates a native renderer of width×height and returns its handle.
Throws FFIException on invalid dimensions or a null result.
Implementation
Pointer<RendererHandle> createRenderer(
int width,
int height, {
bool testing = false,
}) => _guard('Failed to create renderer', () {
if (width == 0 || height == 0) {
throw FFIException(
'Invalid dimensions: width and height must be greater than 0',
);
}
final ptr = _checkNonNull(
'Failed to create renderer',
_generated.createRenderer(width, height, testing),
);
return ptr.cast<RendererHandle>();
});