cardScrollChildrenWidget method

List<Widget> cardScrollChildrenWidget()

Implementation

List<Widget> cardScrollChildrenWidget() {
  if(widget.isEditMode == true) {
    return widget.c.resWallet.value.wallets.map((e) => cardWidget(e)).toList() +  [
      Container(
        // height: 50,
        decoration: BoxDecoration(
          borderRadius: BorderRadius.circular(4.0),
          color: card1Color,
        ),
        child: Material(
            color: Colors.transparent,
            child: InkWell(
                onTap: () => addNewCard(),
                child: Center(
                  child: Column(
                    mainAxisAlignment: MainAxisAlignment.center,
                    crossAxisAlignment: CrossAxisAlignment.center,
                    children: [
                      CircleAvatar(
                          backgroundColor: cardIconColor,
                          child: Image.asset('images/ico_plus_outline.png', package: 'bootpay_bio', width: 34.0, color: card1Color)
                      ),
                      SizedBox(height: 12),
                      Text('새로운 카드 등록', style: TextStyle(color: cardText1Color, fontWeight: FontWeight.bold)),
                    ],
                  ),
                )
            )
        ),
      ),
    ];
  }

  return widget.c.resWallet.value.wallets.map((e) => cardWidget(e)).toList() +  [
    Container(
      // height: 50,
      decoration: BoxDecoration(
        borderRadius: BorderRadius.circular(4.0),
        color: card1Color,
      ),
      child: Material(
          color: Colors.transparent,
          child: InkWell(
              onTap: () => addNewCard(),
              child: Center(
                child: Column(
                  mainAxisAlignment: MainAxisAlignment.center,
                  crossAxisAlignment: CrossAxisAlignment.center,
                  children: [
                    CircleAvatar(
                        backgroundColor: cardIconColor,
                        child: Image.asset('images/ico_plus_outline.png', package: 'bootpay_bio', width: 34.0)
                    ),
                    SizedBox(height: 12),
                    Text('새로운 카드 등록', style: TextStyle(color: cardText1Color, fontWeight: FontWeight.bold)),
                  ],
                ),
              )
          )
      ),
    ),
    if(widget.payload?.extra?.isShowTotalPay ?? true) Container(
      // height: 50,
      decoration: BoxDecoration(
          borderRadius: BorderRadius.circular(4.0),
          color: card2Color
      ),
      child: Material(
          color: Colors.transparent,
          child: InkWell(
              onTap: () => goTotalPay(),
              child: Center(
                child: Column(
                  mainAxisAlignment: MainAxisAlignment.center,
                  crossAxisAlignment: CrossAxisAlignment.center,
                  children: [
                    CircleAvatar(
                        backgroundColor: card1Color,
                        child: Image.asset('images/ico_card_outline.png', package: 'bootpay_bio', width: 34.0, color: cardIconColor)
                    ),
                    SizedBox(height: 12),
                    Text('다른 결제수단', style: TextStyle(color: cardText2Color, fontWeight: FontWeight.bold)),
                  ],
                ),
              )
          )
      ),
    )
  ];
}