getAvatar method

Widget getAvatar(
  1. CometChatTheme theme
)

Implementation

Widget getAvatar(CometChatTheme theme) {
  return CometChatAvatar(
    image: avatarURL,
    name: avatarName,
    style: AvatarStyle(
      width: avatarStyle.width,
      height: avatarStyle.height,
      background: avatarStyle.background ?? theme.palette.getAccent700(),
      borderRadius: avatarStyle.borderRadius,
      outerBorderRadius: avatarStyle.outerBorderRadius,
      border: avatarStyle.border,
      outerViewBackgroundColor: avatarStyle.outerViewBackgroundColor,
      nameTextStyle: avatarStyle.nameTextStyle ??
          TextStyle(
              color: theme.palette.getBackground(),
              fontSize: theme.typography.name.fontSize,
              fontWeight: theme.typography.name.fontWeight,
              fontFamily: theme.typography.name.fontFamily),
      outerViewBorder: avatarStyle.outerViewBorder,
      outerViewSpacing: avatarStyle.outerViewSpacing,
      outerViewWidth: avatarStyle.outerViewWidth,
    ),
  );
}