setFollowSystemTheme method

Future<void> setFollowSystemTheme(
  1. bool follow
)

Set whether to follow system theme changes.

When enabled, the app will automatically switch between light and dark themes based on the device's brightness setting.

Implementation

Future<void> setFollowSystemTheme(bool follow) async {
  _followSystemTheme = follow;
  await _storage.saveFollowSystem(follow);

  if (follow) {
    _applySystemTheme(notify: true, persist: true);
  }
}