getAmount method
Implementation
Widget getAmount(String credit, String debit, BuildContext context) {
final style = GoalTransactionsStyle.of(context);
if (isPending || isFailed) {
if (credit.isNotEmpty) {
return HubbleText(credit, style: style.texts.failedAmount);
}
return HubbleText(debit, style: style.texts.failedAmount);
}
if (credit.isNotEmpty) {
return HubbleText(credit, style: style.texts.credit);
}
return HubbleText(debit, style: style.texts.debit);
}