AvatarWidget.fromUser constructor
- User? user, {
- Key? key,
- AvatarRadius? radius,
- double opacity = 1,
- BoxShape shape = BoxShape.circle,
- bool isOnline = false,
- bool isAway = false,
- BoxConstraints? constraints,
Creates an AvatarWidget from the specified user
.
Implementation
factory AvatarWidget.fromUser(
User? user, {
Key? key,
AvatarRadius? radius,
double opacity = 1,
BoxShape shape = BoxShape.circle,
bool isOnline = false,
bool isAway = false,
BoxConstraints? constraints,
}) => AvatarWidget(
key: key,
avatar: user?.avatar,
title: user?.title,
color: user?.num.val.sum(),
radius: radius,
opacity: opacity,
shape: shape,
isOnline: isOnline,
isAway: isAway,
constraints: constraints,
);