2021-01-06 17:35:57 +00:00
|
|
|
part of 'users.dart';
|
|
|
|
|
|
|
|
class _User extends StatelessWidget {
|
2022-06-05 22:40:34 +00:00
|
|
|
const _User({
|
|
|
|
required this.user,
|
|
|
|
required this.isRootUser,
|
|
|
|
});
|
2021-01-06 17:35:57 +00:00
|
|
|
|
2021-07-29 05:24:42 +00:00
|
|
|
final User user;
|
2021-10-11 21:10:04 +00:00
|
|
|
final bool isRootUser;
|
2021-01-06 17:35:57 +00:00
|
|
|
@override
|
2022-06-05 22:40:34 +00:00
|
|
|
Widget build(final BuildContext context) => InkWell(
|
|
|
|
onTap: () {
|
2023-02-24 16:45:32 +00:00
|
|
|
context.pushRoute(UserDetailsRoute(login: user.login));
|
2022-06-05 22:40:34 +00:00
|
|
|
},
|
|
|
|
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
|
|
|
),
|
2022-06-05 22:40:34 +00:00
|
|
|
const SizedBox(width: 20),
|
|
|
|
Flexible(
|
2023-03-27 17:02:44 +00:00
|
|
|
child: Text(
|
|
|
|
user.login,
|
|
|
|
style: Theme.of(context).textTheme.titleMedium?.copyWith(
|
|
|
|
color: Theme.of(context).colorScheme.onBackground,
|
|
|
|
decoration: isRootUser
|
|
|
|
? TextDecoration.underline
|
|
|
|
: user.isFoundOnServer
|
|
|
|
? TextDecoration.none
|
|
|
|
: TextDecoration.lineThrough,
|
2022-06-05 22:40:34 +00:00
|
|
|
),
|
2023-03-27 17:02:44 +00:00
|
|
|
),
|
2022-06-05 22:40:34 +00:00
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
2021-01-06 17:35:57 +00:00
|
|
|
),
|
2022-06-05 22:40:34 +00:00
|
|
|
);
|
2021-01-06 17:35:57 +00:00
|
|
|
}
|