cardWidget method
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: () {
c.selectedCardIndex = c.resWallet.value.wallets.indexOf(walletData);
startPayWithSelectedCard();
},
child: Center(
child: Padding(
padding: const EdgeInsets.symmetric(vertical: 20.0, horizontal: 20.0),
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
Text(
walletData.batch_data.card_company ?? '',
style: TextStyle(color: CardCode.getColorText(walletData.batch_data.card_company_code ?? ''), fontWeight: FontWeight.bold)
),
Expanded(child: Container())
],
),
Row(
children: [
Expanded(child: Container()),
Text(
walletData.batch_data.card_no ?? '',
style: TextStyle(color: CardCode.getColorText(walletData.batch_data.card_company_code ?? ''), fontWeight: FontWeight.bold)
),
],
),
],
),
),
)
)
),
);
}