/*
 * @Author       : WuWei
 * @LastEditors  : WuWei
 * @Date         : 2021-11-09 09:53:18
 * @LastEditTime : 2023-02-09 10:35:14
 * @Description  : Do not edit
 */
part of '../index.dart';

class _BuildDepositeList extends StatelessWidget {
  const _BuildDepositeList({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    final store = Provider.of<PrivateIndexStore>(context, listen: true);
    final list = store.paylist2;

    /// 押金缴费
    return WisScrollView(
      key: store.indexScorllViewKey2,
      onRefresh: () => store.getDepositeList(isLoad: false),
      onInit: () => store.getDepositeList(isLoad: false),
      onLoad: () => store.getDepositeList(isLoad: true),
      slivers: <Widget>[
        WisSliverList.childBuilder(
            childCount: list.length,
            interval: 0,
            builder: (_, i) {
              var item = list[i];
              return ListItem(
                toDetail: () => store.routeToDetail(item),
                item: item,
                isLast: i == (list.length - 1) ? true : false,
              );
            }),
      ],
    );
  }
}
