show timestamps for state events

This commit is contained in:
Henry Hiles 2026-09-17 23:21:33 -04:00
commit cfab803fa0
Signed by: Henry-Hiles
SSH key fingerprint: SHA256:VKQUdS31Q90KvX7EkKMHMBpUspcmItAh86a+v7PGiIs
4 changed files with 35 additions and 17 deletions

View file

@ -0,0 +1,17 @@
import "package:flutter/material.dart";
import "package:timeago/timeago.dart";
class const Timestamp(final DateTime timestamp, {super.key})
extends StatelessWidget {
@override
Widget build(BuildContext context) => Tooltip(
message: timestamp.toString(),
child: Text(
format(timestamp),
maxLines: 1,
overflow: .ellipsis,
style: Theme.of(context).textTheme.labelSmall
?.copyWith(color: Colors.grey),
),
);
}