diff --git a/lib/src/user_item.dart b/lib/src/user_item.dart index ef442440..d4331cf8 100644 --- a/lib/src/user_item.dart +++ b/lib/src/user_item.dart @@ -24,6 +24,7 @@ class UserItem extends StatelessWidget { this.onLongPress, this.onImageTap, this.selected = false, + this.showLastSeen = true, }) : super(key: key); /// Function called when tapping this widget @@ -41,6 +42,9 @@ class UserItem extends StatelessWidget { /// If true the [UserItem] will show a trailing checkmark final bool selected; + /// If true the [UserItem] will show the last seen + final bool showLastSeen; + @override Widget build(BuildContext context) { return ListTile( @@ -72,7 +76,7 @@ class UserItem extends StatelessWidget { ) : null, title: Text(user.name), - subtitle: _buildLastActive(context), + subtitle: showLastSeen ? _buildLastActive(context) : null, ); }