copyWith method
- @useResult
- FWidgetStateMap<
TextStyle> ? textStyle, - double? iconSpacing,
- FWidgetStateMap<
IconThemeData> ? iconStyle, - double? collapsibleIconSpacing,
- FWidgetStateMap<
IconThemeData> ? collapsibleIconStyle, - Duration? expandDuration,
- Curve? expandCurve,
- Duration? collapseDuration,
- Curve? collapseCurve,
- double? childrenSpacing,
- EdgeInsetsGeometry? childrenPadding,
- FWidgetStateMap<
Color> ? backgroundColor, - EdgeInsetsGeometry? padding,
- BorderRadius? borderRadius,
- FTappableStyle tappableStyle()?,
- FFocusedOutlineStyle focusedOutlineStyle()?,
Returns a copy of this FSidebarItemStyle with the given properties replaced.
Where possible, it is strongly recommended to use the CLI to generate a style and directly modify the style.
textStyle
The label's text style.
Supported states:
iconSpacing
The spacing between the icon and label. Defaults to 8.
iconStyle
The icon's style.
Supported states:
collapsibleIconSpacing
The spacing between the label and collapsible widget. Defaults to 8.
collapsibleIconStyle
The collapsible 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.
childrenSpacing
The spacing between child items. Defaults to 2.
childrenPadding
The padding around the children container. Defaults to EdgeInsets.only(left: 26, top: 2)
.
backgroundColor
The background color.
Supported states:
padding
The padding around the content. Defaults to EdgeInsets.symmetric(horizontal: 12, vertical: 10)
.
borderRadius
The item's border radius.
tappableStyle
The tappable's style.
focusedOutlineStyle
The focused outline style.
Implementation
@useResult
FSidebarItemStyle copyWith({
FWidgetStateMap<TextStyle>? textStyle,
double? iconSpacing,
FWidgetStateMap<IconThemeData>? iconStyle,
double? collapsibleIconSpacing,
FWidgetStateMap<IconThemeData>? collapsibleIconStyle,
Duration? expandDuration,
Curve? expandCurve,
Duration? collapseDuration,
Curve? collapseCurve,
double? childrenSpacing,
EdgeInsetsGeometry? childrenPadding,
FWidgetStateMap<Color>? backgroundColor,
EdgeInsetsGeometry? padding,
BorderRadius? borderRadius,
FTappableStyle Function(FTappableStyle)? tappableStyle,
FFocusedOutlineStyle Function(FFocusedOutlineStyle)? focusedOutlineStyle,
}) => FSidebarItemStyle(
textStyle: textStyle ?? this.textStyle,
iconSpacing: iconSpacing ?? this.iconSpacing,
iconStyle: iconStyle ?? this.iconStyle,
collapsibleIconSpacing: collapsibleIconSpacing ?? this.collapsibleIconSpacing,
collapsibleIconStyle: collapsibleIconStyle ?? this.collapsibleIconStyle,
expandDuration: expandDuration ?? this.expandDuration,
expandCurve: expandCurve ?? this.expandCurve,
collapseDuration: collapseDuration ?? this.collapseDuration,
collapseCurve: collapseCurve ?? this.collapseCurve,
childrenSpacing: childrenSpacing ?? this.childrenSpacing,
childrenPadding: childrenPadding ?? this.childrenPadding,
backgroundColor: backgroundColor ?? this.backgroundColor,
padding: padding ?? this.padding,
borderRadius: borderRadius ?? this.borderRadius,
tappableStyle: tappableStyle != null ? tappableStyle(this.tappableStyle) : this.tappableStyle,
focusedOutlineStyle: focusedOutlineStyle != null
? focusedOutlineStyle(this.focusedOutlineStyle)
: this.focusedOutlineStyle,
);