cardWidget method

Widget cardWidget(
  1. WalletData walletData
)

Implementation

Widget cardWidget(WalletData walletData) {
  return  Container(
    height: 50,
    decoration: BoxDecoration(
        borderRadius: BorderRadius.circular(4.0),
        color: CardCode.getColorBackground(walletData.batch_data.card_company_code ?? '')
    ),
    child: Material(
        color: Colors.transparent,
        child: InkWell(
            onTap: () {
              widget.c.selectedCardIndex = widget.c.resWallet.value.wallets.indexOf(walletData);
              startPayWithSelectedCard();
            },
            child: Center(
              child: Padding(
                padding: const EdgeInsets.only(top: 5.0, bottom: 20.0, left: 20.0, right: 10.0),
                child: Column(
                  mainAxisAlignment: MainAxisAlignment.spaceBetween,
                  crossAxisAlignment: CrossAxisAlignment.start,
                  children: [

                    Container(
                      child: Row(
                        mainAxisAlignment: MainAxisAlignment.spaceBetween,
                        crossAxisAlignment: CrossAxisAlignment.start,
                        children: [
                          Expanded(
                            child: Padding(
                              padding: const EdgeInsets.only(top: 15.0),
                              child: Column(
                                mainAxisAlignment: MainAxisAlignment.start,
                                crossAxisAlignment: CrossAxisAlignment.start,
                                children: [
                                  Text(
                                      walletData.batch_data.card_company ?? '',
                                      style: TextStyle(color: CardCode.getColorText(walletData.batch_data.card_company_code ?? ''), fontWeight: FontWeight.bold)
                                  ),
                                  SizedBox(height: 8),
                                  Image.asset('images/card_chip.png', package: 'bootpay_bio', height: 30.0),
                                ],
                              ),
                            ),
                          ),
                          SizedBox(
                            width: 40,
                            child: IconButton(
                              padding: EdgeInsets.zero,
                              icon: widget.bioCardMoreIcon ?? const Icon(Icons.more_horiz, color: Colors.white),
                              // icon: Image.asset('assets/close.png'),
                              // iconSize: 20,
                              onPressed: () {
                                alertDialogDeleteConfirm(walletData);

                              },
                            ),
                          )
                        ],
                      ),
                    ),
                    Row(
                      children: [
                        Expanded(child: Container()),
                        Padding(
                          padding: const EdgeInsets.only(right: 10.0),
                          child: Text(
                              walletData.batch_data.card_no ?? '',
                              style: TextStyle(color: CardCode.getColorText(walletData.batch_data.card_company_code ?? ''), fontWeight: FontWeight.bold)
                          ),
                        ),
                      ],
                    ),
                  ],
                ),
              ),
            )
        )
    ),
  );
}