copyWith method
FlexSpec
copyWith({
- Axis? direction,
- MainAxisAlignment? mainAxisAlignment,
- CrossAxisAlignment? crossAxisAlignment,
- MainAxisSize? mainAxisSize,
- VerticalDirection? verticalDirection,
- TextDirection? textDirection,
- TextBaseline? textBaseline,
- Clip? clipBehavior,
- double? gap,
- 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,
);
}