AvatarWidget.fromMyUser constructor
Creates an AvatarWidget from the specified MyUser.
Implementation
factory AvatarWidget.fromMyUser(
MyUser? myUser, {
Key? key,
AvatarRadius? radius,
double opacity = 1,
bool badge = true,
FutureOr<void> Function()? onForbidden,
BoxShape shape = BoxShape.circle,
}) => AvatarWidget(
key: key,
isOnline: badge && myUser?.online == true,
isAway: badge && myUser?.presence == Presence.away,
avatar: myUser?.avatar,
title: myUser?.name?.val ?? myUser?.num.toString(),
color: myUser?.num.val.sum(),
radius: radius,
opacity: opacity,
onForbidden: onForbidden,
shape: shape,
);