LinkageView<T extends BaseItem> constructor

LinkageView<T extends BaseItem>(
  1. {List<T> items,
  2. GetGroupItem<BaseItem> itemBuilder,
  3. GetGeneralItem<BaseItem> groupItemBuilder,
  4. GetHearWidget<BaseItem> headerBuilder,
  5. OnGroupItemTap<BaseItem> onGroupItemTap,
  6. bool isNeedStick = true,
  7. Curve curve = Curves.linear,
  8. double itemHeadHeight = 30,
  9. double itemHeight = 50,
  10. double itemGroupHeight = 50,
  11. int duration,
  12. int flexLeft = 1,
  13. int flexRight = 3}
)

Implementation

LinkageView(
    {this.items,
    this.itemBuilder,
    this.groupItemBuilder,
    this.headerBuilder,
    this.onGroupItemTap,
    this.isNeedStick = true,
    this.curve = Curves.linear,
    this.itemHeadHeight = 30,
    this.itemHeight = 50,
    this.itemGroupHeight = 50,
    this.duration,
    this.flexLeft = 1,
    this.flexRight = 3}) {
  for (var i = 0; i < items.length; i++) {
    items[i]
      ..index = i
      ..isSelect = false;
    if (items[i].isHeader) {
      groups.add(items[i]);
    }
  }
}