copyWith method

StickyState<I> copyWith({
  1. double? position,
  2. double? offset,
  3. bool? sticky,
  4. double? contentHeight,
})

Create state duplicate, with optional state options override

Implementation

StickyState<I> copyWith(
        {double? position,
        double? offset,
        bool? sticky,
        double? contentHeight}) =>
    StickyState<I>(
      index,
      position: position ?? this.position,
      offset: offset ?? this.offset,
      sticky: sticky ?? this.sticky,
      contentSize: contentHeight ?? this.contentSize,
    );