copyWith method

NavigationBarTheme copyWith({
  1. ValueGetter<Color?>? backgroundColor,
  2. ValueGetter<NavigationBarAlignment?>? alignment,
  3. ValueGetter<Axis?>? direction,
  4. ValueGetter<double?>? spacing,
  5. ValueGetter<NavigationLabelType?>? labelType,
  6. ValueGetter<NavigationLabelPosition?>? labelPosition,
  7. ValueGetter<NavigationLabelSize?>? labelSize,
  8. ValueGetter<EdgeInsetsGeometry?>? padding,
})

Implementation

NavigationBarTheme copyWith({
  ValueGetter<Color?>? backgroundColor,
  ValueGetter<NavigationBarAlignment?>? alignment,
  ValueGetter<Axis?>? direction,
  ValueGetter<double?>? spacing,
  ValueGetter<NavigationLabelType?>? labelType,
  ValueGetter<NavigationLabelPosition?>? labelPosition,
  ValueGetter<NavigationLabelSize?>? labelSize,
  ValueGetter<EdgeInsetsGeometry?>? padding,
}) {
  return NavigationBarTheme(
    backgroundColor:
        backgroundColor == null ? this.backgroundColor : backgroundColor(),
    alignment: alignment == null ? this.alignment : alignment(),
    direction: direction == null ? this.direction : direction(),
    spacing: spacing == null ? this.spacing : spacing(),
    labelType: labelType == null ? this.labelType : labelType(),
    labelPosition:
        labelPosition == null ? this.labelPosition : labelPosition(),
    labelSize: labelSize == null ? this.labelSize : labelSize(),
    padding: padding == null ? this.padding : padding(),
  );
}