int decimalsFromJson(String? decimals) => decimals != null && decimals != '' ? int.parse(decimals) : 0;