AdaptiveComposer class

A staged composition workspace that moves between a compact editor/preview toggle, a split editor-preview layout, and a fully docked editor-preview plus settings surface.

Inheritance

Constructors

AdaptiveComposer({Key? key, required Widget editor, required Widget preview, required Widget settings, Widget? header, String editorTitle = 'Editor', String? editorDescription, Widget? editorLeading, String previewTitle = 'Preview', String? previewDescription, Widget? previewLeading, String settingsTitle = 'Settings', String? settingsDescription, Widget? settingsLeading, String modalSettingsLabel = 'Open settings', Widget modalSettingsIcon = const Icon(Icons.tune_outlined), AdaptiveSize splitAt = AdaptiveSize.medium, AdaptiveSize settingsDockedAt = AdaptiveSize.expanded, AdaptiveHeight minimumSplitHeight = AdaptiveHeight.compact, AdaptiveHeight minimumSettingsDockedHeight = AdaptiveHeight.medium, bool useContainerConstraints = true, bool considerOrientation = false, AdaptiveComposerSurface? selectedSurface, AdaptiveComposerSurface initialSurface = AdaptiveComposerSurface.editor, ValueChanged<AdaptiveComposerSurface>? onSelectedSurfaceChanged, double spacing = 16, double selectorSpacing = 16, int editorFlex = 3, int previewFlex = 3, int settingsFlex = 2, EdgeInsetsGeometry editorPadding = const EdgeInsets.all(16), EdgeInsetsGeometry previewPadding = const EdgeInsets.all(16), EdgeInsetsGeometry settingsPadding = 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 composer.
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
editor Widget
Main editor surface.
final
editorDescription String?
Optional description shown below editorTitle.
final
editorFlex int
Flex used by the editor region.
final
editorLeading Widget?
Optional leading widget shown beside editorTitle.
final
editorPadding EdgeInsetsGeometry
Padding applied inside the editor surface.
final
editorTitle String
Title shown above the editor surface.
final
hashCode int
The hash code for this object.
no setterinherited
Optional header shown above the composition region.
final
initialSurface AdaptiveComposerSurface
Initial selected compact surface for uncontrolled usage.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
minimumSettingsDockedHeight AdaptiveHeight
Minimum height class required before settings can dock inline.
final
minimumSplitHeight AdaptiveHeight
Minimum height class required before editor and preview can split.
final
modalHeightFactor double
Height factor used by compact modal sheets.
final
modalSettingsIcon Widget
Icon used by the compact settings trigger.
final
modalSettingsLabel String
Label used by the compact settings trigger.
final
onSelectedSurfaceChanged ValueChanged<AdaptiveComposerSurface>?
Called when the compact surface selection changes.
final
preview Widget
Preview surface.
final
previewDescription String?
Optional description shown below previewTitle.
final
previewFlex int
Flex used by the preview region.
final
previewLeading Widget?
Optional leading widget shown beside previewTitle.
final
previewPadding EdgeInsetsGeometry
Padding applied inside the preview surface.
final
previewTitle String
Title shown above the preview surface.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selectedSurface AdaptiveComposerSurface?
Optional controlled selected compact surface.
final
selectorSpacing double
Space between the compact selector and the active surface.
final
settings Widget
Settings or inspector surface.
final
settingsDescription String?
Optional description shown below settingsTitle.
final
settingsDockedAt AdaptiveSize
Semantic size at which the settings surface should dock inline.
final
settingsFlex int
Flex used by the settings region.
final
settingsLeading Widget?
Optional leading widget shown beside settingsTitle.
final
settingsPadding EdgeInsetsGeometry
Padding applied inside the settings surface.
final
settingsTitle String
Title shown above the settings surface.
final
showModalDragHandle bool
Whether to show a drag handle in compact modal sheets.
final
spacing double
Space between adjacent regions.
final
splitAt AdaptiveSize
Semantic size at which the editor and preview should split.
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<AdaptiveComposer>
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