getListSection method

Widget? getListSection()

Implementation

Widget? getListSection() {
  if (items == null) {
    if (scanFinish == 0) {
      return const Text("");
    } else {
      if (scanFinish == -1) {
        return const Center(child: CircularProgressIndicator());
      }
    }
  } else {
    if (scanFinish == 1) {
      Widget listSection = ListView.separated(
        separatorBuilder: (context, index) =>
            Container(height: 1, color: Colors.black),
        shrinkWrap: true,
        physics: const NeverScrollableScrollPhysics(),
        padding: const EdgeInsets.all(5.0),
        itemCount: items == null ? 0 : items!.length,
        itemBuilder: (BuildContext context, int index) {
          return _getListDate(context, index);
        },
      );
      return listSection;
    } else {
      return const Center(child: CircularProgressIndicator());
    }
  }
  return null;
}