rightWidget method

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

Implementation

Widget rightWidget(int index, int max) {
  if(index == 0) {
    return Expanded(
      child: Column(
        mainAxisAlignment: MainAxisAlignment.start,
        crossAxisAlignment: CrossAxisAlignment.end,
        children: [
          Text(widget.payload!.orderName ?? '', style: TextStyle(color: textColor)),
          Opacity(
            opacity: 0.5,
            child: Text(widget.payload!.names!.join(', '), maxLines: 2, textAlign: TextAlign.justify, overflow: TextOverflow.ellipsis, style: TextStyle(color: textColor))
          )
        ],
      ),
    );
  } else if(index > 0 && index < max - 1) {
    return Text(widget.payload!.prices![index-1].priceComma, style: TextStyle(color: textColor));
  } else {
    return Text(widget.payload!.priceComma, style: TextStyle(color: priceColor, fontSize: 18.0, fontWeight: FontWeight.w600));
  }
}