AdaptiveMetricsLab<T> class
A staged analytics workspace that coordinates a query list, a main focus surface, an annotations panel, and a query history panel from one adaptive model.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- AdaptiveMetricsLab
Constructors
-
AdaptiveMetricsLab({Key? key, required List<
T> queries, required Widget itemBuilder(BuildContext context, T query, bool selected, VoidCallback onTap), required Widget focusBuilder(BuildContext context, T query), required Widget annotationsBuilder(BuildContext context, T query), required Widget historyBuilder(BuildContext context, T query), required String queryTitle, required String annotationsTitle, required String historyTitle, Widget? header, Widget? emptyState, String? queryDescription, Widget? queryLeading, String? annotationsDescription, Widget? annotationsLeading, String? historyDescription, Widget? historyLeading, String modalQueryLabel = 'Open queries', Widget modalQueryIcon = const Icon(Icons.query_stats_outlined), String modalAnnotationsLabel = 'Open annotations', Widget modalAnnotationsIcon = const Icon(Icons.draw_outlined), String modalHistoryLabel = 'Open history', Widget modalHistoryIcon = const Icon(Icons.history_outlined), AdaptiveSize queryDockedAt = AdaptiveSize.medium, AdaptiveSize annotationsDockedAt = AdaptiveSize.expanded, AdaptiveSize historyDockedAt = AdaptiveSize.expanded, AdaptiveHeight minimumQueryDockedHeight = AdaptiveHeight.compact, AdaptiveHeight minimumAnnotationsDockedHeight = AdaptiveHeight.medium, AdaptiveHeight minimumHistoryDockedHeight = AdaptiveHeight.expanded, bool useContainerConstraints = true, bool considerOrientation = false, int? selectedIndex, int initialIndex = 0, ValueChanged<int> ? onSelectedIndexChanged, double spacing = 16, double itemSpacing = 12, int queryFlex = 2, int focusFlex = 4, int annotationsFlex = 2, int focusPaneFlex = 3, int historyFlex = 2, EdgeInsetsGeometry queryPadding = const EdgeInsets.all(16), EdgeInsetsGeometry focusPadding = const EdgeInsets.all(16), EdgeInsetsGeometry annotationsPadding = const EdgeInsets.all(16), EdgeInsetsGeometry historyPadding = 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 metrics 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
- annotationsBuilder → Widget Function(BuildContext context, T query)
-
Builds the annotations panel for the selected query.
final
- annotationsDescription → String?
-
Optional description shown below annotationsTitle.
final
- annotationsDockedAt → AdaptiveSize
-
Semantic size at which the annotations panel should dock inline.
final
- annotationsFlex → int
-
Flex used by the docked annotations region.
final
- annotationsLeading → Widget?
-
Optional leading widget shown beside annotationsTitle.
final
- annotationsPadding → EdgeInsetsGeometry
-
Padding applied inside the annotations surface.
final
- annotationsTitle → String
-
Title shown above the annotations panel.
final
- considerOrientation → bool
-
Whether orientation should influence container-based breakpoint selection.
final
- emptyState → Widget?
-
Optional empty state shown when queries is empty.
final
- focusBuilder → Widget Function(BuildContext context, T query)
-
Builds the active metric focus surface for the selected query.
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 history is docked below it.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- header → Widget?
-
Optional header shown above the active focus surface.
final
- historyBuilder → Widget Function(BuildContext context, T query)
-
Builds the query history panel for the selected query.
final
- historyDescription → String?
-
Optional description shown below historyTitle.
final
- historyDockedAt → AdaptiveSize
-
Semantic size at which the history panel should dock inline.
final
- historyFlex → int
-
Flex used by the docked history region.
final
- historyLeading → Widget?
-
Optional leading widget shown beside historyTitle.
final
- historyPadding → EdgeInsetsGeometry
-
Padding applied inside the history surface.
final
- historyTitle → String
-
Title shown above the query history panel.
final
- initialIndex → int
-
Initial selected query index for uncontrolled usage.
final
- itemBuilder → Widget Function(BuildContext context, T query, bool selected, VoidCallback onTap)
-
Builds an individual query row.
final
- itemSpacing → double
-
Space between adjacent query rows.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- minimumAnnotationsDockedHeight → AdaptiveHeight
-
Minimum height class required before annotations can dock inline.
final
- minimumHistoryDockedHeight → AdaptiveHeight
-
Minimum height class required before history can dock inline.
final
- minimumQueryDockedHeight → AdaptiveHeight
-
Minimum height class required before the query list can dock inline.
final
- modalAnnotationsIcon → Widget
-
Icon used by the compact annotations trigger.
final
- modalAnnotationsLabel → String
-
Label used by the compact annotations trigger.
final
- modalHeightFactor → double
-
Height factor used by compact modal sheets.
final
- modalHistoryIcon → Widget
-
Icon used by the compact history trigger.
final
- modalHistoryLabel → String
-
Label used by the compact history trigger.
final
- modalQueryIcon → Widget
-
Icon used by the compact query-list trigger.
final
- modalQueryLabel → String
-
Label used by the compact query-list trigger.
final
-
onSelectedIndexChanged
→ ValueChanged<
int> ? -
Called when the selected query changes.
final
-
queries
→ List<
T> -
Queries or metric definitions shown in the list.
final
- queryDescription → String?
-
Optional description shown below queryTitle.
final
- queryDockedAt → AdaptiveSize
-
Semantic size at which the query list should dock inline.
final
- queryFlex → int
-
Flex used by the docked query-list region.
final
- queryLeading → Widget?
-
Optional leading widget shown beside queryTitle.
final
- queryPadding → EdgeInsetsGeometry
-
Padding applied inside the query list surface.
final
- queryTitle → String
-
Title shown above the query list.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selectedIndex → int?
-
Optional controlled selected query 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