/*
 * @Author       : WuWei
 * @LastEditors  : WuWei
 * @Date         : 2021-11-09 09:52:52
 * @LastEditTime : 2021-11-09 10:58:56
 * @Description  : Do not edit
 */
part of '../index.dart';

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

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

    /// 账单缴费
    return WisScrollView(
      key: store.indexScorllViewKey0,
      onRefresh: () => store.getList(isLoad: false),
      onInit: () => store.getList(isLoad: false),
      onLoad: () => store.getList(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,
              );
            }),
      ],
    );
  }
}
