setBrightness method
Sets the brightness of the window.
Implementation
Future<void> setBrightness(Brightness brightness) async {
tryNative(
() => nativeapi.Application.instance.setBrightness(switch (brightness) {
Brightness.light => nativeapi.Brightness.light,
Brightness.dark => nativeapi.Brightness.dark,
}),
);
}