selfprivacy.org.app/lib/ui/pages/users/user.dart
NaiJi 2ac8e4366b Linting!
Co-authored-by: Inex Code <inex.code@selfprivacy.org>
2022-06-06 01:40:34 +03:00

52 lines
1.4 KiB
Dart

part of 'users.dart';
class _User extends StatelessWidget {
const _User({
required this.user,
required this.isRootUser,
});
final User user;
final bool isRootUser;
@override
Widget build(final BuildContext context) => InkWell(
onTap: () {
showBrandBottomSheet<void>(
context: context,
builder: (final BuildContext context) =>
_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,
),
),
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,
),
),
),
],
),
),
);
}