getFastModeState method

FastModeState getFastModeState(
  1. ModelSetting? model,
  2. bool? fastModeUserEnabled
)

Get the overall fast mode state.

Implementation

FastModeState getFastModeState(
  ModelSetting model,
  bool? fastModeUserEnabled,
) {
  final enabled =
      isFastModeEnabled &&
      isFastModeAvailable &&
      (fastModeUserEnabled == true) &&
      isFastModeSupportedByModel(model);
  if (enabled && isCooldown) return FastModeState.cooldown;
  if (enabled) return FastModeState.on;
  return FastModeState.off;
}