payInfoContainer method

Widget payInfoContainer()

Implementation

Widget payInfoContainer() {
  return widget.isEditMode == true ? Container() : Container(
    child: Padding(
      padding: const EdgeInsets.symmetric(horizontal: 15.0),
      child: ListView.builder(
          shrinkWrap: true,
          padding: EdgeInsets.zero,

          itemCount: (widget.payload?.prices?.length ?? 0) + 2,
          // separatorBuilder: (BuildContext context, int index) => Divider(),

          itemBuilder: (BuildContext context, int index) {

            double topPadding = 20.0;
            if(index != 0) { topPadding = 6.0; }
            if(index == (widget.payload?.prices?.length ?? 0) + 1) { topPadding = 4.75;}

            double bottomPadding = 6.0;
            if(index == (widget.payload?.prices?.length ?? 0) + 1) { bottomPadding = 20.0; }

            return Container(
              child: Padding(
                padding: EdgeInsets.only(left: 0.0, right: 0.0, top: topPadding, bottom: bottomPadding),
                child: Container(
                  child: Row(
                    mainAxisAlignment: MainAxisAlignment.spaceBetween,
                    crossAxisAlignment: CrossAxisAlignment.start,
                    children: [
                      leftWidget(index, (widget.payload?.prices?.length ?? 0) + 2),
                      rightWidget(index, (widget.payload?.prices?.length ?? 0) + 2)
                    ],
                  ),
                ),
              ),
            );
          }),

    ),
  );
}