Fluent2Accordion class

Fluent 2's Accordion: items as sections that open and shut, each a header (the chevron, the title, 10 in at the start and 12 at the end, 44 tall) over its panel 12 in from either side. One open at a time unless multiple; the open one shuts again only when collapsible. Open state is the caller's (expanded, told through onExpansionChanged) or the accordion's own from initiallyExpanded. Panels open with Fluent's collapse motion (durationNormal), at once under Reduce Motion. Read as headers that say whether they are expanded.

Fluent2Accordion(items: [Fluent2AccordionItem(value: 'agenda', title: 'Agenda', child: Text('Roadmap review')), Fluent2AccordionItem(value: 'notes', title: 'Notes', child: Text('Shared after the call'))], initiallyExpanded: const {'agenda'})
Inheritance

Constructors

Fluent2Accordion({required List<Fluent2AccordionItem> items, bool multiple = false, bool collapsible = true, Set<Object>? expanded, Set<Object> initiallyExpanded = const <Object>{}, void onExpansionChanged(Object value, bool open)?, Fluent2AccordionSize size = Fluent2AccordionSize.medium, Fluent2ExpandIconPosition expandIconPosition = Fluent2ExpandIconPosition.start, Key? key})
An accordion of items.
const

Properties

collapsible → bool
Whether the open section may be shut again (with none open after).
final
expanded → Set<Object>?
The open sections' values when the caller keeps them; null keeps them here, starting from initiallyExpanded.
final
expandIconPosition → Fluent2ExpandIconPosition
Fluent's expandIconPosition: the chevron at the start or the end.
final
hashCode → int
The hash code for this object.
no setterinherited
initiallyExpanded → Set<Object>
The sections open at first, by value.
final
items → List<Fluent2AccordionItem>
The sections, in order.
final
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
multiple → bool
Whether more than one section may stand open.
final
onExpansionChanged → void Function(Object value, bool open)?
Told the section pressed and whether it is now open.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
size → Fluent2AccordionSize
Fluent's size: the headers' height and type.
final

Methods

createElement() → StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → State<Fluent2Accordion>
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.
override
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