getAmount method

Widget getAmount(
  1. String credit,
  2. String debit,
  3. BuildContext context
)

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);
}