refactor(ui): Show isPrimaryUser as an icon

This commit is contained in:
Inex Code 2024-11-11 05:59:15 +03:00
parent 9fda021c67
commit a0d76a2979

View file

@ -23,13 +23,15 @@ class UserListItem extends StatelessWidget {
user.login[0].toUpperCase(), user.login[0].toUpperCase(),
), ),
), ),
trailing: isPrimaryUser
? Icon(Icons.admin_panel_settings_outlined,
color: Theme.of(context).colorScheme.primary)
: null,
title: Text( title: Text(
user.login, user.login,
style: Theme.of(context).textTheme.titleMedium?.copyWith( style: Theme.of(context).textTheme.titleMedium?.copyWith(
color: Theme.of(context).colorScheme.onSurface, color: Theme.of(context).colorScheme.onSurface,
decoration: isPrimaryUser decoration: user.isFoundOnServer
? TextDecoration.underline
: user.isFoundOnServer
? TextDecoration.none ? TextDecoration.none
: TextDecoration.lineThrough, : TextDecoration.lineThrough,
), ),