AdaptiveExperimentLab<T> class

A staged experimentation workspace that coordinates an experiment list, an active focus surface, an evidence panel, and a decision log from one adaptive model.

Inheritance

Constructors

AdaptiveExperimentLab({Key? key, required List<T> experiments, required Widget itemBuilder(BuildContext context, T experiment, bool selected, VoidCallback onTap), required Widget focusBuilder(BuildContext context, T experiment), required Widget evidenceBuilder(BuildContext context, T experiment), required Widget decisionBuilder(BuildContext context, T experiment), required String experimentTitle, required String evidenceTitle, required String decisionTitle, Widget? header, Widget? emptyState, String? experimentDescription, Widget? experimentLeading, String? evidenceDescription, Widget? evidenceLeading, String? decisionDescription, Widget? decisionLeading, String modalExperimentLabel = 'Open experiments', Widget modalExperimentIcon = const Icon(Icons.science_outlined), String modalEvidenceLabel = 'Open evidence', Widget modalEvidenceIcon = const Icon(Icons.fact_check_outlined), String modalDecisionLabel = 'Open decisions', Widget modalDecisionIcon = const Icon(Icons.rule_outlined), AdaptiveSize experimentDockedAt = AdaptiveSize.medium, AdaptiveSize evidenceDockedAt = AdaptiveSize.expanded, AdaptiveSize decisionDockedAt = AdaptiveSize.expanded, AdaptiveHeight minimumExperimentDockedHeight = AdaptiveHeight.compact, AdaptiveHeight minimumEvidenceDockedHeight = AdaptiveHeight.medium, AdaptiveHeight minimumDecisionDockedHeight = AdaptiveHeight.expanded, bool useContainerConstraints = true, bool considerOrientation = false, int? selectedIndex, int initialIndex = 0, ValueChanged<int>? onSelectedIndexChanged, double spacing = 16, double itemSpacing = 12, int experimentFlex = 2, int focusFlex = 4, int evidenceFlex = 2, int focusPaneFlex = 3, int decisionFlex = 2, EdgeInsetsGeometry experimentPadding = const EdgeInsets.all(16), EdgeInsetsGeometry focusPadding = const EdgeInsets.all(16), EdgeInsetsGeometry evidencePadding = const EdgeInsets.all(16), EdgeInsetsGeometry decisionPadding = 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 experiment lab.
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
decisionBuilder Widget Function(BuildContext context, T experiment)
Builds the decision log for the selected experiment.
final
decisionDescription String?
Optional description shown below decisionTitle.
final
decisionDockedAt AdaptiveSize
Semantic size at which the decision panel should dock inline.
final
decisionFlex int
Flex used by the docked decision region.
final
decisionLeading Widget?
Optional leading widget shown beside decisionTitle.
final
decisionPadding EdgeInsetsGeometry
Padding applied inside the decision surface.
final
decisionTitle String
Title shown above the decision panel.
final
emptyState Widget?
Optional empty state shown when experiments is empty.
final
evidenceBuilder Widget Function(BuildContext context, T experiment)
Builds the evidence panel for the selected experiment.
final
evidenceDescription String?
Optional description shown below evidenceTitle.
final
evidenceDockedAt AdaptiveSize
Semantic size at which the evidence panel should dock inline.
final
evidenceFlex int
Flex used by the docked evidence region.
final
evidenceLeading Widget?
Optional leading widget shown beside evidenceTitle.
final
evidencePadding EdgeInsetsGeometry
Padding applied inside the evidence surface.
final
evidenceTitle String
Title shown above the evidence panel.
final
experimentDescription String?
Optional description shown below experimentTitle.
final
experimentDockedAt AdaptiveSize
Semantic size at which the experiment list should dock inline.
final
experimentFlex int
Flex used by the docked experiment-list region.
final
experimentLeading Widget?
Optional leading widget shown beside experimentTitle.
final
experimentPadding EdgeInsetsGeometry
Padding applied inside the experiment list surface.
final
experiments List<T>
Experiments shown in the list.
final
experimentTitle String
Title shown above the experiment list.
final
focusBuilder Widget Function(BuildContext context, T experiment)
Builds the active experiment focus surface for the selected experiment.
final
focusFlex int
Flex used by the focus region.
final
focusPadding EdgeInsetsGeometry
Padding applied inside the focus surface.
final
focusPaneFlex int
Flex used by the focus surface when decisions are docked below it.
final
hashCode int
The hash code for this object.
no setterinherited
Optional header shown above the active focus surface.
final
initialIndex int
Initial selected experiment index for uncontrolled usage.
final
itemBuilder Widget Function(BuildContext context, T experiment, bool selected, VoidCallback onTap)
Builds an individual experiment row.
final
itemSpacing double
Space between adjacent experiment rows.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
minimumDecisionDockedHeight AdaptiveHeight
Minimum height class required before decisions can dock inline.
final
minimumEvidenceDockedHeight AdaptiveHeight
Minimum height class required before evidence can dock inline.
final
minimumExperimentDockedHeight AdaptiveHeight
Minimum height class required before the experiment list can dock inline.
final
modalDecisionIcon Widget
Icon used by the compact decision trigger.
final
modalDecisionLabel String
Label used by the compact decision trigger.
final
modalEvidenceIcon Widget
Icon used by the compact evidence trigger.
final
modalEvidenceLabel String
Label used by the compact evidence trigger.
final
modalExperimentIcon Widget
Icon used by the compact experiment-list trigger.
final
modalExperimentLabel String
Label used by the compact experiment-list trigger.
final
modalHeightFactor double
Height factor used by compact modal sheets.
final
onSelectedIndexChanged ValueChanged<int>?
Called when the selected experiment changes.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selectedIndex int?
Optional controlled selected experiment index.
final
showModalDragHandle bool
Whether to show a drag handle in compact modal sheets.
final
spacing double
Space between adjacent regions.
final
useContainerConstraints bool
Whether to derive layout decisions from parent constraints.
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