getCardItem method
Implementation
Widget getCardItem(int index){
return Padding(
padding: EdgeInsets.symmetric(horizontal: 6, vertical: 10),
child: Card(
shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(10)),
color: colorArray[index],
elevation: 2,
margin: EdgeInsets.all(0),
child: Stack(
fit: StackFit.expand,
children: <Widget>[
Image.asset(Img.get('world_map.png'),fit: BoxFit.cover),
Padding(
padding: EdgeInsets.all(20),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Row(
children: <Widget>[
Spacer(),
Container(
padding: EdgeInsets.symmetric(horizontal: 4),
decoration: BoxDecoration(
color: Colors.white.withOpacity(0.8),
borderRadius: new BorderRadius.all(Radius.circular(4))
),
width: 50, height: 30,
child: Image.asset(Img.get(logo_array[index]), fit: BoxFit.cover),
)
],
),
Container(height: 10),
Text(postfix_array[index], style: MyText.headline(context)!.copyWith(
color: Colors.white, fontFamily: "monospace"
)),
Container(height: 10),
Row(
children: <Widget>[
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text("EXPIRE", style: MyText.body1(context)!.copyWith(color: MyColors.grey_10)),
Container(height: 5),
Text(expire_array[index], style: MyText.subhead(context)!.copyWith(
color: Colors.white, fontFamily: "monospace"
)),
],
),
Container(width: 20),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text("CVV", style: MyText.body1(context)!.copyWith(color: MyColors.grey_10)),
Container(height: 5),
Text(cvv_array[index], style: MyText.subhead(context)!.copyWith(
color: Colors.white, fontFamily: "monospace"
)),
],
),
Container(width: 40)
],
),
Container(height: 10),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text("NICK NAME", style: MyText.body1(context)!.copyWith(color: MyColors.grey_10)),
Container(height: 5),
Text("Anderson Thomas", style: MyText.subhead(context)!.copyWith(
color: Colors.white, fontFamily: "monospace"
)),
],
),
],
),
)
],
),
),
);
}