Pages/StreamPage/detection_status
library
Classes
-
DetectionStatus
-
What ObservANT's
/healthz says: its name, whether and when a cat was in view, and its visits.
-
DetectionStatusLine
-
ObservANT's name and its cat, polled from
/healthz; with no ObservANT behind the page, fallbackName alone.
-
Visit
-
One visit from
/healthz's detection.recent: when it arrived, how long it stayed once it had left, and as what.
Functions
-
arrivalPicture(String url, String label)
→ dynamic
-
The arrival picture at
url, 240 px wide: the previous one until the next loads, nothing on an error.
-
detectionLine(dynamic l10n, DetectionStatus status, DateTime now, String locale)
→ (dynamic, dynamic, String)
-
What
status says about the cat in one line, with its icon and colour.
-
formatLastSeen(DateTime when, DateTime now, String locale)
→ String
-
14:32 for today, Oct 11 14:32 for an earlier day, in locale.
-
stayMinutes(Duration stayed)
→ String
-
A stay in whole minutes,
<1 below one.
-
visitText(dynamic l10n, Visit visit, DateTime now, String locale, {bool named = false})
→ String
-
One visit as the status line lists it:
14:32 (3 min), or the time alone while it goes on; named, what came first.