CustomerBalance.fromJson constructor

CustomerBalance.fromJson(
  1. dynamic data
)

Implementation

factory CustomerBalance.fromJson(dynamic data) {
  var json = DynamicJsonExtension.getJsonMap(data);
  return CustomerBalance(
    balance: json['balance']?.toDouble(),
    id: json['id'],
    icon: json['icon'],
    isSelected: json['isSelected'] ?? json['is_selected'],
    type: methodTypeFromJson(json['type']),
  );
}