setMaterial method

void setMaterial(
  1. String windowId,
  2. int material, {
  3. int layerId = 0,
})

Set the blur material for a window and layer.

Implementation

void setMaterial(String windowId, int material, {int layerId = 0}) {
  if (!_initialized) return;

  final idPtr = windowId.toNativeUtf8().cast<Char>();
  try {
    if (_setMaterialLayer != null) {
      _setMaterialLayer!(idPtr, layerId, material);
    } else {
      _setMaterial(idPtr, material);
    }
  } finally {
    calloc.free(idPtr);
  }
}