StreamMessageStackPosition enum

The position of a message within a consecutive stack from the same sender.

Chat applications commonly group consecutive messages from the same user, adjusting the bubble's visual treatment (typically corner radii) based on where it sits in the group.

{@tool snippet}

Select a bubble border radius based on stack position:

final borderRadius = switch (stackPosition) {
  .single => BorderRadius.circular(20),
  .top    => BorderRadius.vertical(top: Radius.circular(20)),
  .middle => BorderRadius.zero,
  .bottom => BorderRadius.vertical(bottom: Radius.circular(20)),
};

{@end-tool}

See also:

Inheritance
Available extensions

Values

single → const StreamMessageStackPosition

A standalone message that is not part of any group.

top → const StreamMessageStackPosition

The first message in a consecutive group.

middle → const StreamMessageStackPosition

A message in the middle of a consecutive group.

bottom → const StreamMessageStackPosition

The last message in a consecutive group.

Properties

hashCode → int
The hash code for this object.
no setterinherited
index → int
A numeric identifier for the enumerated value.
no setterinherited
name → String

Available on Enum, provided by the EnumName extension

The name of the enum value.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Constants

values → const List<StreamMessageStackPosition>
A constant List of the values in this enum, in order of their declaration.