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

50 lines
1.4 KiB
Dart
Raw Normal View History

2021-01-06 19:35:57 +02:00
part of 'users.dart';
class _User extends StatelessWidget {
const _User({
required this.user,
required this.isRootUser,
});
2021-01-06 19:35:57 +02:00
2021-07-29 08:24:42 +03:00
final User user;
2021-10-12 00:10:04 +03:00
final bool isRootUser;
2021-01-06 19:35:57 +02:00
@override
Widget build(final BuildContext context) => InkWell(
onTap: () {
2022-09-05 15:12:00 +03:00
Navigator.of(context).push(
materialRoute(_UserDetails(user: user, isRootUser: isRootUser)),
);
},
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 19:35:57 +02:00
),
const SizedBox(width: 20),
Flexible(
child: isRootUser
? BrandText.h4Underlined(user.login)
// cross out text if user not found on server
: BrandText.h4(
user.login,
style: user.isFoundOnServer
? null
: const TextStyle(
decoration: TextDecoration.lineThrough,
),
),
),
],
),
2021-01-06 19:35:57 +02:00
),
);
2021-01-06 19:35:57 +02:00
}