AvatarGroup constructor

const AvatarGroup({
  1. Key? key,
  2. required AlignmentGeometry alignment,
  3. required List<AvatarWidget> children,
  4. double? gap,
  5. Clip? clipBehavior,
})

Creates an AvatarGroup with custom alignment.

This is the base constructor that allows full control over the overlapping behavior through the alignment parameter.

Parameters:

  • alignment (AlignmentGeometry, required): Direction of overlap
  • children (List
  • gap (double?, optional): Spacing between avatars
  • clipBehavior (Clip?, optional): Clipping behavior

Example:

AvatarGroup(
  alignment: Alignment(0.5, 0),
  children: [Avatar(initials: 'A'), Avatar(initials: 'B')],
  gap: 6.0,
);

Implementation

const AvatarGroup({
  super.key,
  required this.alignment,
  required this.children,
  this.gap,
  this.clipBehavior,
});