convertTextCurrencyToInt static method

int convertTextCurrencyToInt(
  1. String? value
)

Implementation

static int convertTextCurrencyToInt(String? value) {
  if (value.isNullOrEmpty) return 0;

  var tempValue = value!.replaceAll('.', '');
  var intValue = int.tryParse(tempValue == '' ? '0' : tempValue);
  return intValue ?? 0;
}