copyWith static method
Widget
copyWith({
- Key? key,
- required Widget child,
- EdgeInsets? padding,
- double? height,
- double? width,
- Color? tabBarBackgroundColor,
- TextStyle? textStyle,
- IconThemeData? iconThemeData,
- double? itemSpacing,
- EdgeInsets? itemPadding,
- Color? itemColor,
- Color? itemHoverColor,
- Color? itemHighlightColor,
- bool? itemFilled,
- Color? itemBackgroundColor,
- Color? itemHoverBackgroundColor,
- Color? itemHighlightBackgroundColor,
Makes a copy of the nearest TabTheme overwriting selected fields.
Implementation
static Widget copyWith({
Key? key,
required Widget child,
EdgeInsets? padding,
double? height,
double? width,
Color? tabBarBackgroundColor,
TextStyle? textStyle,
IconThemeData? iconThemeData,
double? itemSpacing,
EdgeInsets? itemPadding,
Color? itemColor,
Color? itemHoverColor,
Color? itemHighlightColor,
bool? itemFilled,
Color? itemBackgroundColor,
Color? itemHoverBackgroundColor,
Color? itemHighlightBackgroundColor,
Duration? menuTransitionDuration,
Curve? menuTrasitionCurve,
Curve? menuTrasitionReverseCurve,
}) {
return Builder(
key: key,
builder: (context) => TabTheme(
data: TabTheme.of(context).copyWith(
padding: padding,
height: height,
width: width,
tabBarBackgroundColor: tabBarBackgroundColor,
textStyle: textStyle,
iconThemeData: iconThemeData,
itemSpacing: itemSpacing,
itemPadding: itemPadding,
itemColor: itemColor,
itemHoverColor: itemHoverColor,
itemHighlightColor: itemHighlightColor,
itemFilled: itemFilled,
itemBackgroundColor: itemBackgroundColor,
itemHoverBackgroundColor: itemHoverBackgroundColor,
itemHighlightBackgroundColor: itemHighlightBackgroundColor,
menuTransitionDuration: menuTransitionDuration,
menuTrasitionCurve: menuTrasitionCurve,
menuTrasitionReverseCurve: menuTrasitionReverseCurve,
),
child: child,
),
);
}