2021-01-06 17:35:57 +00:00
|
|
|
part of 'users.dart';
|
|
|
|
|
|
|
|
class _User extends StatelessWidget {
|
2021-10-11 21:10:04 +00:00
|
|
|
const _User({Key? key, required this.user, required this.isRootUser})
|
2021-09-29 18:28:47 +00:00
|
|
|
: super(key: key);
|
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
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return InkWell(
|
|
|
|
onTap: () {
|
2021-06-20 21:08:52 +00:00
|
|
|
showBrandBottomSheet<void>(
|
2021-01-06 17:35:57 +00:00
|
|
|
context: context,
|
|
|
|
builder: (BuildContext context) {
|
2021-10-11 21:10:04 +00:00
|
|
|
return _UserDetails(user: user, isRootUser: isRootUser);
|
2021-01-06 17:35:57 +00:00
|
|
|
},
|
|
|
|
);
|
|
|
|
},
|
|
|
|
child: Container(
|
2021-05-25 21:53:54 +00:00
|
|
|
padding: paddingH15V0,
|
2021-01-06 17:35:57 +00:00
|
|
|
height: 48,
|
|
|
|
child: Row(
|
|
|
|
children: [
|
|
|
|
Container(
|
|
|
|
width: 17,
|
|
|
|
height: 17,
|
|
|
|
decoration: BoxDecoration(
|
2021-07-29 05:24:42 +00:00
|
|
|
color: user.color,
|
2021-01-06 17:35:57 +00:00
|
|
|
shape: BoxShape.circle,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
SizedBox(width: 20),
|
2021-09-29 18:28:47 +00:00
|
|
|
Flexible(
|
2021-10-11 21:10:04 +00:00
|
|
|
child: isRootUser
|
2021-09-29 18:28:47 +00:00
|
|
|
? BrandText.h4Underlined(user.login)
|
|
|
|
: BrandText.h4(user.login),
|
|
|
|
),
|
2021-01-06 17:35:57 +00:00
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|