AdaptiveApprovalDesk<T> class
A staged approval workspace that coordinates an approval list, an active proposal surface, a criteria panel, and a decision history panel from one adaptive model.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- AdaptiveApprovalDesk
Constructors
-
AdaptiveApprovalDesk({Key? key, required List<
T> approvals, required Widget itemBuilder(BuildContext context, T approval, bool selected, VoidCallback onTap), required Widget proposalBuilder(BuildContext context, T approval), required Widget criteriaBuilder(BuildContext context, T approval), required Widget historyBuilder(BuildContext context, T approval), required String approvalTitle, required String criteriaTitle, required String historyTitle, Widget? header, Widget? emptyState, String? approvalDescription, Widget? approvalLeading, String? criteriaDescription, Widget? criteriaLeading, String? historyDescription, Widget? historyLeading, String modalApprovalLabel = 'Open approvals', Widget modalApprovalIcon = const Icon(Icons.approval_outlined), String modalCriteriaLabel = 'Open criteria', Widget modalCriteriaIcon = const Icon(Icons.fact_check_outlined), String modalHistoryLabel = 'Open history', Widget modalHistoryIcon = const Icon(Icons.history_outlined), AdaptiveSize approvalDockedAt = AdaptiveSize.medium, AdaptiveSize criteriaDockedAt = AdaptiveSize.expanded, AdaptiveSize historyDockedAt = AdaptiveSize.expanded, AdaptiveHeight minimumApprovalDockedHeight = AdaptiveHeight.compact, AdaptiveHeight minimumCriteriaDockedHeight = 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 approvalFlex = 2, int proposalFlex = 4, int criteriaFlex = 2, int proposalPaneFlex = 3, int historyFlex = 2, EdgeInsetsGeometry approvalPadding = const EdgeInsets.all(16), EdgeInsetsGeometry proposalPadding = const EdgeInsets.all(16), EdgeInsetsGeometry criteriaPadding = 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 approval 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
- approvalDescription → String?
-
Optional description shown below approvalTitle.
final
- approvalDockedAt → AdaptiveSize
-
Semantic size at which the approval list should dock inline.
final
- approvalFlex → int
-
Flex used by the docked approval-list region.
final
- approvalLeading → Widget?
-
Optional leading widget shown beside approvalTitle.
final
- approvalPadding → EdgeInsetsGeometry
-
Padding applied inside the approval list surface.
final
-
approvals
→ List<
T> -
Approval items shown in the list.
final
- approvalTitle → String
-
Title shown above the approval list.
final
- considerOrientation → bool
-
Whether orientation should influence container-based breakpoint selection.
final
- criteriaBuilder → Widget Function(BuildContext context, T approval)
-
Builds the criteria panel for the selected approval item.
final
- criteriaDescription → String?
-
Optional description shown below criteriaTitle.
final
- criteriaDockedAt → AdaptiveSize
-
Semantic size at which the criteria panel should dock inline.
final
- criteriaFlex → int
-
Flex used by the docked criteria region.
final
- criteriaLeading → Widget?
-
Optional leading widget shown beside criteriaTitle.
final
- criteriaPadding → EdgeInsetsGeometry
-
Padding applied inside the criteria surface.
final
- criteriaTitle → String
-
Title shown above the criteria panel.
final
- emptyState → Widget?
-
Optional empty state shown when approvals is empty.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- header → Widget?
-
Optional header shown above the active proposal surface.
final
- historyBuilder → Widget Function(BuildContext context, T approval)
-
Builds the decision history panel for the selected approval item.
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 history panel.
final
- initialIndex → int
-
Initial selected approval index for uncontrolled usage.
final
- itemBuilder → Widget Function(BuildContext context, T approval, bool selected, VoidCallback onTap)
-
Builds an individual approval row.
final
- itemSpacing → double
-
Space between adjacent approval rows.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- minimumApprovalDockedHeight → AdaptiveHeight
-
Minimum height class required before the approval list can dock inline.
final
- minimumCriteriaDockedHeight → AdaptiveHeight
-
Minimum height class required before criteria can dock inline.
final
- minimumHistoryDockedHeight → AdaptiveHeight
-
Minimum height class required before history can dock inline.
final
- modalApprovalIcon → Widget
-
Icon used by the compact approval-list trigger.
final
- modalApprovalLabel → String
-
Label used by the compact approval-list trigger.
final
- modalCriteriaIcon → Widget
-
Icon used by the compact criteria trigger.
final
- modalCriteriaLabel → String
-
Label used by the compact criteria 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
-
onSelectedIndexChanged
→ ValueChanged<
int> ? -
Called when the selected approval changes.
final
- proposalBuilder → Widget Function(BuildContext context, T approval)
-
Builds the active proposal surface for the selected approval item.
final
- proposalFlex → int
-
Flex used by the proposal region.
final
- proposalPadding → EdgeInsetsGeometry
-
Padding applied inside the proposal surface.
final
- proposalPaneFlex → int
-
Flex used by the proposal surface when history is docked below it.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selectedIndex → int?
-
Optional controlled selected approval 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