copyWith method
TabsTheme
copyWith({
- ValueGetter<
EdgeInsetsGeometry?> ? containerPadding, - ValueGetter<
EdgeInsetsGeometry?> ? tabPadding, - ValueGetter<
Color?> ? backgroundColor, - ValueGetter<
BorderRadiusGeometry?> ? borderRadius,
Creates a copy of this theme with optionally replaced values.
Uses ValueGetter functions to allow nullable value replacement. Properties not provided retain their current values.
Parameters:
containerPadding: Optional getter for new container paddingtabPadding: Optional getter for new tab paddingbackgroundColor: Optional getter for new background colorborderRadius: Optional getter for new border radius
Returns a new TabsTheme with updated values.
Implementation
TabsTheme copyWith({
ValueGetter<EdgeInsetsGeometry?>? containerPadding,
ValueGetter<EdgeInsetsGeometry?>? tabPadding,
ValueGetter<Color?>? backgroundColor,
ValueGetter<BorderRadiusGeometry?>? borderRadius,
}) {
return TabsTheme(
containerPadding:
containerPadding == null ? this.containerPadding : containerPadding(),
tabPadding: tabPadding == null ? this.tabPadding : tabPadding(),
backgroundColor:
backgroundColor == null ? this.backgroundColor : backgroundColor(),
borderRadius: borderRadius == null ? this.borderRadius : borderRadius(),
);
}