/*
 * @Author       : WuWei
 * @LastEditors: ChenYaJin
 * @Date         : 2022-03-28 14:42:40
 * @LastEditTime: 2023-03-27 11:21:47
 * @Description  : Do not edit
 */
part of '../index.dart';

class _ListCopyView extends StatelessWidget {
  _ListCopyView({
    Key? key,
  }) : super(key: key);

  @override
  Widget build(BuildContext context) {
    final ReportIndexStore store = Get.find<ReportIndexStore>();

    return NotificationListener<ScrollNotification>(
      onNotification: (ScrollNotification scrollInfo) {
        if (store.tabIndex.value == 1) {
          store.handleScrollEvent(scrollInfo);
        }
        return true;
      },
      child: CustomScrollView(
        slivers: <Widget>[
          Obx(() {
            return SliverPadding(
              padding: EdgeInsets.fromLTRB(15.pt, 5.pt, 15.pt, 15.pt),
              sliver: SliverToBoxAdapter(
                child: Column(
                  mainAxisSize: MainAxisSize.min,
                  children: [
                    for (var item in store.copyList)
                      Wisdom(
                        onTap: () => store.route2RepairDetail(item),
                        borderRadius: BorderRadius.circular(6.pt),
                        child: ListViewItem(
                          item: item,
                        ),
                      ),
                    if (store.isLast.value == true &&
                        store.isEmpty.value == false) ...[
                      LastText(),
                    ],
                    if (store.isEmpty.value == true) ...[
                      WEmptyWidget(text: WisText('暂无数据'))
                    ],
                    SizedBox(height: 34.pt),
                  ],
                ),
              ),
            );
          })
        ],
      ),
    );
  }
}
