CollapsibleTheme class
Theme configuration for Collapsible, CollapsibleTrigger, and CollapsibleContent widgets.
CollapsibleTheme provides styling options for collapsible components including padding, iconography, and layout alignment. It enables consistent collapsible styling across an application while allowing per-instance customization.
Used with ComponentTheme to apply theme values throughout the widget tree.
Example:
ComponentTheme<CollapsibleTheme>(
data: CollapsibleTheme(
padding: 12.0,
iconExpanded: Icons.keyboard_arrow_up,
iconCollapsed: Icons.keyboard_arrow_down,
iconGap: 8.0,
crossAxisAlignment: CrossAxisAlignment.start,
),
child: MyCollapsibleWidget(),
);
Constructors
- CollapsibleTheme({double? padding, IconData? iconExpanded, IconData? iconCollapsed, CrossAxisAlignment? crossAxisAlignment, MainAxisAlignment? mainAxisAlignment, double? iconGap})
-
Creates a CollapsibleTheme with the specified styling options.
const
Properties
- crossAxisAlignment → CrossAxisAlignment?
-
Cross-axis alignment for children in the Collapsible column.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- iconCollapsed → IconData?
-
Icon displayed in the trigger when the collapsible is collapsed.
final
- iconExpanded → IconData?
-
Icon displayed in the trigger when the collapsible is expanded.
final
- iconGap → double?
-
Horizontal spacing between trigger content and expand/collapse icon.
final
- mainAxisAlignment → MainAxisAlignment?
-
Main-axis alignment for children in the Collapsible column.
final
- padding → double?
-
Horizontal padding applied around CollapsibleTrigger content.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
copyWith(
{ValueGetter< double?> ? padding, ValueGetter<IconData?> ? iconExpanded, ValueGetter<IconData?> ? iconCollapsed, ValueGetter<CrossAxisAlignment?> ? crossAxisAlignment, ValueGetter<MainAxisAlignment?> ? mainAxisAlignment, ValueGetter<double?> ? iconGap}) → CollapsibleTheme - Creates a copy of this theme with the given fields replaced.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override