ConfigurationAud.fromJson constructor
ConfigurationAud.fromJson(
- Object? json
Implementation
factory ConfigurationAud.fromJson(Object? json) {
final map = (json as Map).cast<String, Object?>();
return ConfigurationAud(
fixedAmounts: map['fixed_amounts'] == null
? null
: (map['fixed_amounts'] as List<Object?>)
.map((el) => (el as num).toInt())
.toList(),
percentages: map['percentages'] == null
? null
: (map['percentages'] as List<Object?>)
.map((el) => (el as num).toInt())
.toList(),
smartTipThreshold: map['smart_tip_threshold'] == null
? null
: (map['smart_tip_threshold'] as num).toInt(),
);
}