ParticipantGrid class
An adaptive grid layout that arranges participant tiles like Google Meet.
- Max 6 visible tiles on screen (no scrolling).
- If participants > 6: shows 5 tiles + a "+N" overflow tile.
- Responsive layout adapts to participant count.
SDK users can use this standalone:
ParticipantGrid(
participants: session.allParticipants,
localAttendeeId: session.localAttendeeId,
roster: session.roster,
maxVisibleTiles: 6,
)
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- ParticipantGrid
Constructors
-
ParticipantGrid({Key? key, required List<
Attendee> participants, String? localAttendeeId, Map<String, String> roster = const {}, Widget tileBuilder(BuildContext context, Attendee attendee, bool isLocal)?, double spacing = 8, BorderRadius tileBorderRadius = const BorderRadius.all(Radius.circular(12)), int maxVisibleTiles = 6, Set<String> activeSpeakers = const {}}) -
const
Properties
-
activeSpeakers
→ Set<
String> -
Set of attendee IDs that are currently active speakers.
Used to show a speaking ring on their tile.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- localAttendeeId → String?
-
The local attendee's ID — used to identify the local tile.
final
- maxVisibleTiles → int
-
Maximum number of visible tiles. Tiles beyond this show as "+N".
Defaults to 6.
final
-
participants
→ List<
Attendee> -
All participants to render (including local).
final
-
roster
→ Map<
String, String> -
Optional roster map (attendeeId → display name).
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- spacing → double
-
Spacing between grid tiles. Defaults to 4.
final
- tileBorderRadius → BorderRadius
-
Border radius for default tiles. Ignored if tileBuilder is provided.
final
- tileBuilder → Widget Function(BuildContext context, Attendee attendee, bool isLocal)?
-
Optional custom tile builder. If null, uses default ParticipantTile.
final
Methods
-
build(
BuildContext context) → Widget -
Describes the part of the user interface represented by this widget.
override
-
createElement(
) → StatelessElement -
Creates a StatelessElement to manage this widget's location in the tree.
inherited
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited