multiplyDecStr static method

Decimal multiplyDecStr(
  1. String? a,
  2. String? b
)

Implementation

static Decimal multiplyDecStr(String? a, String? b) {
  if (a == null || a.isEmpty || a == 'null') {
    a = '0';
  }
  if (b == null || b.isEmpty || b == 'null') {
    b = '0';
  }
  return Decimal.parse(a) * Decimal.parse(b);
}