copyWith method

HiddenTheme copyWith({
  1. ValueGetter<Axis?>? direction,
  2. ValueGetter<Duration?>? duration,
  3. ValueGetter<Curve?>? curve,
  4. ValueGetter<bool?>? reverse,
  5. ValueGetter<bool?>? keepCrossAxisSize,
  6. ValueGetter<bool?>? keepMainAxisSize,
})

Returns a copy of this theme with the given fields replaced.

Implementation

HiddenTheme copyWith({
  ValueGetter<Axis?>? direction,
  ValueGetter<Duration?>? duration,
  ValueGetter<Curve?>? curve,
  ValueGetter<bool?>? reverse,
  ValueGetter<bool?>? keepCrossAxisSize,
  ValueGetter<bool?>? keepMainAxisSize,
}) {
  return HiddenTheme(
    direction: direction == null ? this.direction : direction(),
    duration: duration == null ? this.duration : duration(),
    curve: curve == null ? this.curve : curve(),
    reverse: reverse == null ? this.reverse : reverse(),
    keepCrossAxisSize: keepCrossAxisSize == null
        ? this.keepCrossAxisSize
        : keepCrossAxisSize(),
    keepMainAxisSize: keepMainAxisSize == null
        ? this.keepMainAxisSize
        : keepMainAxisSize(),
  );
}