copyWith method
- @useResult
- EdgeInsets? padding,
- double? headerSpacing,
- EdgeInsetsGeometry? headerPadding,
- TextStyle? labelStyle,
- FWidgetStateMap<
IconThemeData> ? actionStyle, - double? childrenSpacing,
- EdgeInsetsGeometry? childrenPadding,
- FTappableStyle tappableStyle()?,
- FFocusedOutlineStyle focusedOutlineStyle()?,
- FSidebarItemStyle itemStyle()?,
Returns a copy of this FSidebarGroupStyle with the given properties replaced.
Where possible, it is strongly recommended to use the CLI to generate a style and directly modify the style.
padding
The padding. Defaults to EdgeInsets.symmetric(horizontal: 16).
headerSpacing
The spacing between the label and action in the header. Defaults to 8.
headerPadding
The padding around the header. Defaults to EdgeInsets.fromLTRB(12, 0, 8, 2).
labelStyle
The label's text style.
actionStyle
The action's style.
childrenSpacing
The spacing between children. Defaults to 2.
childrenPadding
The padding around the children. Defaults to EdgeInsets.fromLTRB(0, 0, 0, 24).
tappableStyle
The tappable action's style.
focusedOutlineStyle
The focused outline style.
itemStyle
The item's style.
Implementation
@useResult
FSidebarGroupStyle copyWith({
EdgeInsets? padding,
double? headerSpacing,
EdgeInsetsGeometry? headerPadding,
TextStyle? labelStyle,
FWidgetStateMap<IconThemeData>? actionStyle,
double? childrenSpacing,
EdgeInsetsGeometry? childrenPadding,
FTappableStyle Function(FTappableStyle)? tappableStyle,
FFocusedOutlineStyle Function(FFocusedOutlineStyle)? focusedOutlineStyle,
FSidebarItemStyle Function(FSidebarItemStyle)? itemStyle,
}) => FSidebarGroupStyle(
padding: padding ?? this.padding,
headerSpacing: headerSpacing ?? this.headerSpacing,
headerPadding: headerPadding ?? this.headerPadding,
labelStyle: labelStyle ?? this.labelStyle,
actionStyle: actionStyle ?? this.actionStyle,
childrenSpacing: childrenSpacing ?? this.childrenSpacing,
childrenPadding: childrenPadding ?? this.childrenPadding,
tappableStyle: tappableStyle != null ? tappableStyle(this.tappableStyle) : this.tappableStyle,
focusedOutlineStyle: focusedOutlineStyle != null
? focusedOutlineStyle(this.focusedOutlineStyle)
: this.focusedOutlineStyle,
itemStyle: itemStyle != null ? itemStyle(this.itemStyle) : this.itemStyle,
);