copyWith method

TreeAnimationStyle copyWith({
  1. TreeAnimationSpec? expandCollapse,
  2. TreeAnimationSpec? enterExit,
  3. TreeAnimationSpec? reorderSlide,
  4. TreeAnimationSpec? makeRoom,
  5. TreeAnimationSpec? dropSettle,
})

Copies with the given fields replaced. Omitted fields keep their stored value, including a stored "unset" for the fallback families, which therefore keep inheriting. Un-setting a fallback family that was previously set is not expressible; construct a fresh style.

Implementation

TreeAnimationStyle copyWith({
  TreeAnimationSpec? expandCollapse,
  TreeAnimationSpec? enterExit,
  TreeAnimationSpec? reorderSlide,
  TreeAnimationSpec? makeRoom,
  TreeAnimationSpec? dropSettle,
}) {
  return TreeAnimationStyle(
    expandCollapse: expandCollapse ?? this.expandCollapse,
    enterExit: enterExit ?? _enterExit,
    reorderSlide: reorderSlide ?? this.reorderSlide,
    makeRoom: makeRoom ?? _makeRoom,
    dropSettle: dropSettle ?? _dropSettle,
  );
}