onInit method
Called immediately after the widget is allocated in memory. You might use this to initialize something for the controller.
Implementation
@override
void onInit() {
super.onInit();
_brightness = SchedulerBinding.instance.window.platformBrightness.obs;
final String? source = _preferences.getString(_themeModeKey);
if (source != null) {
themeMode.value = parse(source);
}
}