AdaptiveConversationDesk<T> class

A staged messaging workspace that coordinates a conversation list, a central thread, and a supporting context panel from one adaptive model.

Inheritance

Constructors

AdaptiveConversationDesk({Key? key, required List<T> conversations, required Widget itemBuilder(BuildContext context, T conversation, bool selected, VoidCallback onTap), required Widget threadBuilder(BuildContext context, T conversation), required Widget contextBuilder(BuildContext context, T conversation), required String listTitle, required String contextTitle, Widget? header, Widget? emptyState, String? listDescription, Widget? listLeading, String? contextDescription, Widget? contextLeading, String modalListLabel = 'Open conversations', Widget modalListIcon = const Icon(Icons.chat_bubble_outline), String modalContextLabel = 'Open context', Widget modalContextIcon = const Icon(Icons.info_outline), AdaptiveSize listDockedAt = AdaptiveSize.medium, AdaptiveSize contextDockedAt = AdaptiveSize.expanded, AdaptiveHeight minimumListDockedHeight = AdaptiveHeight.compact, AdaptiveHeight minimumContextDockedHeight = AdaptiveHeight.medium, bool useContainerConstraints = true, bool considerOrientation = false, int? selectedIndex, int initialIndex = 0, ValueChanged<int>? onSelectedIndexChanged, double spacing = 16, double itemSpacing = 12, int listFlex = 2, int threadFlex = 4, int contextFlex = 2, EdgeInsetsGeometry listPadding = const EdgeInsets.all(16), EdgeInsetsGeometry threadPadding = const EdgeInsets.all(16), EdgeInsetsGeometry contextPadding = const EdgeInsets.all(16), double modalHeightFactor = 0.72, bool showModalDragHandle = true, bool animateSize = true, Duration animationDuration = const Duration(milliseconds: 250), Curve animationCurve = Curves.easeInOutCubic})
Creates an adaptive conversation desk.
const

Properties

animateSize bool
Whether to animate size changes when the mode changes.
final
animationCurve Curve
Curve used by AnimatedSize and AnimatedSwitcher.
final
animationDuration Duration
Duration used by AnimatedSize and AnimatedSwitcher.
final
considerOrientation bool
Whether orientation should influence container-based breakpoint selection.
final
contextBuilder Widget Function(BuildContext context, T conversation)
Builds the supporting context panel for the selected conversation.
final
contextDescription String?
Optional description shown below contextTitle.
final
contextDockedAt AdaptiveSize
Semantic size at which the context panel should dock inline.
final
contextFlex int
Flex used by the docked context region.
final
contextLeading Widget?
Optional leading widget shown beside contextTitle.
final
contextPadding EdgeInsetsGeometry
Padding applied inside the context surface.
final
contextTitle String
Title shown above the context panel.
final
conversations List<T>
Conversations shown in the list.
final
emptyState Widget?
Optional empty state shown when conversations is empty.
final
hashCode int
The hash code for this object.
no setterinherited
Optional header shown above the active thread.
final
initialIndex int
Initial selected conversation index for uncontrolled usage.
final
itemBuilder Widget Function(BuildContext context, T conversation, bool selected, VoidCallback onTap)
Builds an individual conversation row.
final
itemSpacing double
Space between adjacent conversation rows.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
listDescription String?
Optional description shown below listTitle.
final
listDockedAt AdaptiveSize
Semantic size at which the conversation list should dock inline.
final
listFlex int
Flex used by the docked list region.
final
listLeading Widget?
Optional leading widget shown beside listTitle.
final
listPadding EdgeInsetsGeometry
Padding applied inside the conversation list surface.
final
listTitle String
Title shown above the conversation list.
final
minimumContextDockedHeight AdaptiveHeight
Minimum height class required before the context panel can dock inline.
final
minimumListDockedHeight AdaptiveHeight
Minimum height class required before the list can dock inline.
final
modalContextIcon Widget
Icon used by the compact context trigger.
final
modalContextLabel String
Label used by the compact context trigger.
final
modalHeightFactor double
Height factor used by compact modal sheets.
final
modalListIcon Widget
Icon used by the compact list trigger.
final
modalListLabel String
Label used by the compact list trigger.
final
onSelectedIndexChanged ValueChanged<int>?
Called when the selected conversation changes.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selectedIndex int?
Optional controlled selected conversation index.
final
showModalDragHandle bool
Whether to show a drag handle in compact modal sheets.
final
spacing double
Space between adjacent regions.
final
threadBuilder Widget Function(BuildContext context, T conversation)
Builds the active thread for the selected conversation.
final
threadFlex int
Flex used by the thread region.
final
threadPadding EdgeInsetsGeometry
Padding applied inside the thread surface.
final
useContainerConstraints bool
Whether to derive layout decisions from parent constraints.
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<AdaptiveConversationDesk<T>>
Creates the mutable state for this widget at a given location in the tree.
override
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