displayedWidget property
Widget
get
displayedWidget
Implementation
Widget get displayedWidget {
Widget w = Text(widget.text,
style: TextStyle(color: Colors.grey.shade200, fontSize: 20.0));
switch (status) {
case CardPayButtonStatus.ready:
break;
case CardPayButtonStatus.processing:
w = SizedBox(
height: 20,
width: 20,
child: CircularProgressIndicator(
color: Colors.green.shade50,
strokeWidth: 2.0,
),
);
break;
case CardPayButtonStatus.success:
w = Icon(
Icons.check_circle,
color: Colors.green.shade100,
);
break;
case CardPayButtonStatus.fail:
w = Icon(
Icons.highlight_remove_rounded,
color: Colors.red.shade900,
);
break;
default:
break;
}
return w;
}