alreadyNight top-level property Null safety
Implementation
bool get alreadyNight {
var now = DateTime.now();
if (now.hour >= 0 && now.hour < 5) return true;
if (now.hour >= 20 && now.hour < 24) return true;
return false;
}
bool get alreadyNight {
var now = DateTime.now();
if (now.hour >= 0 && now.hour < 5) return true;
if (now.hour >= 20 && now.hour < 24) return true;
return false;
}