resultList method

dynamic resultList(
  1. BuildContext context,
  2. List<DocumentSnapshot<Object?>> docs
)

Implementation

dynamic resultList(BuildContext context, List<DocumentSnapshot> docs) {
  if (docs.isNotEmpty) {
    return HAListItemView(
      builder: builder,
      data: docs,
      groupByField: groupBy,
      header: header,
      maxCrossAxisExtent: maxCrossAxisExtent != null
          ? 300
          : maxCrossAxisExtent!(MediaQuery.of(context).orientation),
      style: ListViewStyle.auto,
    );

    // return ScreenTypeLayout(
    //   mobile: LazyLoadScrollView(
    //       onEndOfPage: () => model.requestNextPage(query),
    //       child: buildListView(docs, context)),
    //   tablet: LazyLoadScrollView(
    //       onEndOfPage: () => model.requestNextPage(query),
    //       child: buildWaterfallFlow(docs, context)),
    //   desktop: LazyLoadScrollView(
    //       onEndOfPage: () => model.requestNextPage(query),
    //       child: buildWaterfallFlow(docs, context)),
    // );
  } else {
    return emptyWidget ?? Container();
  }
}