getUserAvatarNameColor function

Color getUserAvatarNameColor(
  1. User user,
  2. List<Color> colors
)

Returns user avatar and name color based on the ID.

Implementation

Color getUserAvatarNameColor(types.User user, List<Color> colors) =>
    colors[user.id.hashCode % colors.length];