setMaterial static method

Future<void> setMaterial(
  1. NSVisualEffectViewMaterial material
)

Modifies the window's subview's material property.

Examples:

await WindowManipulator.setMaterial(
  material: NSVisualEffectViewMaterial.windowBackground,
);
await WindowManipulator.setMaterial(
  material: NSVisualEffectViewMaterial.sidebar,
);

Implementation

static Future<void> setMaterial(NSVisualEffectViewMaterial material) async {
  await _completer.future;
  await _windowManipulatorMethodChannel.invokeMethod(
    'setMaterial',
    {'material': material.index},
  );
}