isInNightRange static method

bool isInNightRange(
  1. DateTime time
)

Implementation

static bool isInNightRange(DateTime time) {
  final local = time.toLocal();
  return local.hour >= 22 || local.hour <= 6;
}