copyWith method

  1. @override
FlexSpec copyWith({
  1. Axis? direction,
  2. MainAxisAlignment? mainAxisAlignment,
  3. CrossAxisAlignment? crossAxisAlignment,
  4. MainAxisSize? mainAxisSize,
  5. VerticalDirection? verticalDirection,
  6. TextDirection? textDirection,
  7. TextBaseline? textBaseline,
  8. Clip? clipBehavior,
  9. double? gap,
  10. AnimatedData? animated,
})
override

Creates a copy of this spec with the given fields replaced by the non-null parameter values.

Implementation

@override
FlexSpec copyWith({
  Axis? direction,
  MainAxisAlignment? mainAxisAlignment,
  CrossAxisAlignment? crossAxisAlignment,
  MainAxisSize? mainAxisSize,
  VerticalDirection? verticalDirection,
  TextDirection? textDirection,
  TextBaseline? textBaseline,
  Clip? clipBehavior,
  double? gap,
  AnimatedData? animated,
}) {
  return FlexSpec(
    crossAxisAlignment: crossAxisAlignment ?? this.crossAxisAlignment,
    mainAxisAlignment: mainAxisAlignment ?? this.mainAxisAlignment,
    mainAxisSize: mainAxisSize ?? this.mainAxisSize,
    verticalDirection: verticalDirection ?? this.verticalDirection,
    direction: direction ?? this.direction,
    textDirection: textDirection ?? this.textDirection,
    textBaseline: textBaseline ?? this.textBaseline,
    clipBehavior: clipBehavior ?? this.clipBehavior,
    gap: gap ?? this.gap,
    animated: animated ?? this.animated,
  );
}