copyWith method Null safety

ExpanderThemeData copyWith(
  1. {Color? color,
  2. ExpanderType? type,
  3. ExpanderPosition? position,
  4. ExpanderModifier? modifier,
  5. bool? animated,
  6. double? size}
)

Creates a copy of this theme but with the given fields replaced with the new values.

Implementation

ExpanderThemeData copyWith({
  Color? color,
  ExpanderType? type,
  ExpanderPosition? position,
  ExpanderModifier? modifier,
  bool? animated,
  double? size,
}) {
  return ExpanderThemeData(
    color: color ?? this.color,
    type: type ?? this.type,
    position: position ?? this.position,
    modifier: modifier ?? this.modifier,
    size: size ?? this.size,
    animated: animated ?? this.animated,
  );
}