double? newCustomFunction(String? amount) { // convert string to double if (amount == null) { return 0.00; } return double.parse(amount); }