copyWith method

TabBarTheme copyWith(
  1. {Decoration? indicator,
  2. Color? indicatorColor,
  3. TabBarIndicatorSize? indicatorSize,
  4. Color? dividerColor,
  5. double? dividerHeight,
  6. Color? labelColor,
  7. EdgeInsetsGeometry? labelPadding,
  8. TextStyle? labelStyle,
  9. Color? unselectedLabelColor,
  10. TextStyle? unselectedLabelStyle,
  11. MaterialStateProperty<Color?>? overlayColor,
  12. InteractiveInkFeatureFactory? splashFactory,
  13. MaterialStateProperty<MouseCursor?>? mouseCursor,
  14. TabAlignment? tabAlignment}
)

Creates a copy of this object but with the given fields replaced with the new values.

Implementation

TabBarTheme copyWith({
  Decoration? indicator,
  Color? indicatorColor,
  TabBarIndicatorSize? indicatorSize,
  Color? dividerColor,
  double? dividerHeight,
  Color? labelColor,
  EdgeInsetsGeometry? labelPadding,
  TextStyle? labelStyle,
  Color? unselectedLabelColor,
  TextStyle? unselectedLabelStyle,
  MaterialStateProperty<Color?>? overlayColor,
  InteractiveInkFeatureFactory? splashFactory,
  MaterialStateProperty<MouseCursor?>? mouseCursor,
  TabAlignment? tabAlignment,
}) {
  return TabBarTheme(
    indicator: indicator ?? this.indicator,
    indicatorColor: indicatorColor ?? this.indicatorColor,
    indicatorSize: indicatorSize ?? this.indicatorSize,
    dividerColor: dividerColor ?? this.dividerColor,
    dividerHeight: dividerHeight ?? this.dividerHeight,
    labelColor: labelColor ?? this.labelColor,
    labelPadding: labelPadding ?? this.labelPadding,
    labelStyle: labelStyle ?? this.labelStyle,
    unselectedLabelColor: unselectedLabelColor ?? this.unselectedLabelColor,
    unselectedLabelStyle: unselectedLabelStyle ?? this.unselectedLabelStyle,
    overlayColor: overlayColor ?? this.overlayColor,
    splashFactory: splashFactory ?? this.splashFactory,
    mouseCursor: mouseCursor ?? this.mouseCursor,
    tabAlignment: tabAlignment ?? this.tabAlignment,
  );
}