getRecommendedNow static method

FrequencyState getRecommendedNow({
  1. DateTime? now,
})

Returns the top recommended state for right now.

Implementation

static FrequencyState getRecommendedNow({DateTime? now}) {
  final hour = (now ?? DateTime.now()).hour;
  final id = _primaryForHour(hour);
  return StateCatalog.byId(id) ?? StateCatalog.free.first;
}