copyWith method
- @useResult
- FWidgetStateMap<
TextStyle> ? titleTextStyle, - TextStyle? childTextStyle,
- EdgeInsetsGeometry? titlePadding,
- EdgeInsetsGeometry? childPadding,
- FWidgetStateMap<
IconThemeData> ? iconStyle, - Duration? expandDuration,
- Curve? expandCurve,
- Duration? collapseDuration,
- Curve? collapseCurve,
- FFocusedOutlineStyle focusedOutlineStyle()?,
- FDividerStyle dividerStyle()?,
- FTappableStyle tappableStyle()?,
Returns a copy of this FAccordionStyle with the given properties replaced.
Where possible, it is strongly recommended to use the CLI to generate a style and directly modify the style.
titleTextStyle
The title's text style.
Supported states:
childTextStyle
The child's default text style.
titlePadding
The padding around the title. Defaults to EdgeInsets.symmetric(vertical: 15)
.
childPadding
The padding around the content. Defaults to EdgeInsets.only(bottom: 15)
.
iconStyle
The icon's style.
Supported states:
expandDuration
The expand animation's duration. Defaults to 200ms.
expandCurve
The expand animation's curve. Defaults to Curves.easeOutCubic.
collapseDuration
The collapse animation's duration. Defaults to 150ms.
collapseCurve
The collapse animation's curve. Defaults to Curves.easeInCubic.
focusedOutlineStyle
The focused outline style.
dividerStyle
The divider's color.
tappableStyle
The tappable's style.
Implementation
@useResult
FAccordionStyle copyWith({
FWidgetStateMap<TextStyle>? titleTextStyle,
TextStyle? childTextStyle,
EdgeInsetsGeometry? titlePadding,
EdgeInsetsGeometry? childPadding,
FWidgetStateMap<IconThemeData>? iconStyle,
Duration? expandDuration,
Curve? expandCurve,
Duration? collapseDuration,
Curve? collapseCurve,
FFocusedOutlineStyle Function(FFocusedOutlineStyle)? focusedOutlineStyle,
FDividerStyle Function(FDividerStyle)? dividerStyle,
FTappableStyle Function(FTappableStyle)? tappableStyle,
}) => FAccordionStyle(
titleTextStyle: titleTextStyle ?? this.titleTextStyle,
childTextStyle: childTextStyle ?? this.childTextStyle,
titlePadding: titlePadding ?? this.titlePadding,
childPadding: childPadding ?? this.childPadding,
iconStyle: iconStyle ?? this.iconStyle,
expandDuration: expandDuration ?? this.expandDuration,
expandCurve: expandCurve ?? this.expandCurve,
collapseDuration: collapseDuration ?? this.collapseDuration,
collapseCurve: collapseCurve ?? this.collapseCurve,
focusedOutlineStyle: focusedOutlineStyle != null
? focusedOutlineStyle(this.focusedOutlineStyle)
: this.focusedOutlineStyle,
dividerStyle: dividerStyle != null ? dividerStyle(this.dividerStyle) : this.dividerStyle,
tappableStyle: tappableStyle != null ? tappableStyle(this.tappableStyle) : this.tappableStyle,
);