copyWith static method

Widget copyWith({
  1. Key? key,
  2. required Widget child,
  3. EdgeInsets? padding,
  4. double? height,
  5. double? itemSpacing,
  6. Color? color,
  7. IconThemeData? iconTheme,
  8. TextStyle? textStyle,
  9. Color? backgroundColor,
  10. Color? highlightColor,
})

Makes a copy of the nearest BreadcrumbTheme overwriting selected fields.

Implementation

static Widget copyWith({
  Key? key,
  required Widget child,
  EdgeInsets? padding,
  double? height,
  double? itemSpacing,
  Color? color,
  IconThemeData? iconTheme,
  TextStyle? textStyle,
  Color? backgroundColor,
  Color? highlightColor,
}) {
  return Builder(
    key: key,
    builder: (context) => BreadcrumbTheme(
      data: BreadcrumbTheme.of(context).copyWith(
        padding: padding,
        height: height,
        itemSpacing: itemSpacing,
        color: color,
        iconTheme: iconTheme,
        textStyle: textStyle,
        backgroundColor: backgroundColor,
        highlightColor: highlightColor,
      ),
      child: child,
    ),
  );
}