setBrightness method
change webview theme.
available only: macOS (Brightness.dark only 10.14+)
Implementation
@override
void setBrightness(Brightness? brightness) {
/// -1 : system default
/// 0 : dark
/// 1 : light
if (!Platform.isMacOS) {
return;
}
channel.invokeMethod("setBrightness", {
"viewId": viewId,
"brightness": brightness?.index ?? -1,
});
}