reorganize and rename widgets
This commit is contained in:
parent
05d25869ef
commit
d5f29dc344
1 changed files with 568 additions and 547 deletions
17
lib/widgets/common/timestamp.dart
Normal file
17
lib/widgets/common/timestamp.dart
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
import "package:material_ui/material_ui.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),
|
||||
),
|
||||
);
|
||||
}
|
||||
Loading…
Reference in a new issue