AccordionTheme class

Theme configuration for Accordion, AccordionItem, and AccordionTrigger widgets.

AccordionTheme provides comprehensive styling options for all accordion-related widgets, including animation timing, spacing, colors, and iconography. It allows for consistent accordion styling across an application while still permitting per-instance customization.

Used with ComponentTheme to apply theme values throughout the widget tree.

Example:

ComponentTheme<AccordionTheme>(
  data: AccordionTheme(
    duration: Duration(milliseconds: 300),
    curve: Curves.easeInOut,
    padding: 20.0,
    arrowIcon: Icons.expand_more,
    arrowIconColor: Colors.blue,
  ),
  child: MyAccordionWidget(),
);
Inheritance

Constructors

AccordionTheme({Duration? duration, Curve? curve, Curve? reverseCurve, double? padding, double? iconGap, double? dividerHeight, Color? dividerColor, IconData? arrowIcon, Color? arrowIconColor})
Creates an AccordionTheme with the specified styling options.
const

Properties

arrowIcon IconData?
Icon displayed in the trigger to indicate expand/collapse state.
final
arrowIconColor Color?
Color of the expand/collapse arrow icon.
final
curve Curve?
Animation curve used when expanding accordion items.
final
dividerColor Color?
Color of divider lines between accordion items.
final
dividerHeight double?
Height of divider lines between accordion items.
final
duration Duration?
Duration of the expand/collapse animation.
final
hashCode int
The hash code for this object.
no setteroverride
iconGap double?
Horizontal spacing between trigger text and the expand/collapse icon.
final
padding double?
Vertical padding applied to accordion triggers and content.
final
reverseCurve Curve?
Animation curve used when collapsing accordion items.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

copyWith({ValueGetter<Duration?>? duration, ValueGetter<Curve?>? curve, ValueGetter<Curve?>? reverseCurve, ValueGetter<double?>? padding, ValueGetter<double?>? iconGap, ValueGetter<double?>? dividerHeight, ValueGetter<Color?>? dividerColor, ValueGetter<IconData?>? arrowIcon, ValueGetter<Color?>? arrowIconColor}) AccordionTheme
Creates a copy of this theme with the given values replaced.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override