selfprivacy.org.app/lib/ui/pages/users/user.dart

48 lines
1.3 KiB
Dart
Raw Normal View History

2021-01-06 17:35:57 +00:00
part of 'users.dart';
class _User extends StatelessWidget {
const _User({
required this.user,
required this.isPrimaryUser,
});
2021-01-06 17:35:57 +00:00
2021-07-29 05:24:42 +00:00
final User user;
final bool isPrimaryUser;
2021-01-06 17:35:57 +00:00
@override
Widget build(final BuildContext context) => InkWell(
onTap: () {
context.pushRoute(UserDetailsRoute(login: user.login));
},
child: Container(
padding: paddingH15V0,
height: 48,
child: Row(
children: [
Container(
width: 17,
height: 17,
decoration: BoxDecoration(
color: user.color,
shape: BoxShape.circle,
),
2021-01-06 17:35:57 +00:00
),
const SizedBox(width: 20),
Flexible(
child: Text(
user.login,
style: Theme.of(context).textTheme.titleMedium?.copyWith(
color: Theme.of(context).colorScheme.onBackground,
decoration: isPrimaryUser
? TextDecoration.underline
: user.isFoundOnServer
? TextDecoration.none
: TextDecoration.lineThrough,
),
),
),
],
),
2021-01-06 17:35:57 +00:00
),
);
2021-01-06 17:35:57 +00:00
}