leftWidget method

Widget leftWidget(
  1. int index,
  2. int max
)

Implementation

Widget leftWidget(int index, int max) {
  // print("index: $index, max: $max, max1: ${(widget.payload?.prices?.length ?? 0)}");
  String label = '결제정보';
  if(index > 0 && index < max - 1) label = widget.payload!.prices![index-1].name ?? '';
  else if(index == max - 1) { label = '총 결제금액'; }
  return Padding(
    padding: EdgeInsets.only(top: index == max - 1 ? 2.5 : 0.0),
    child: Text(label, style: TextStyle(color: textColor)),
  );
}