AttackProperty.fromJson constructor

AttackProperty.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory AttackProperty.fromJson(Map<String, dynamic> json) {
  return AttackProperty(
    attackLayer: (json['AttackLayer'] as String?)?.toAttackLayer(),
    attackPropertyIdentifier: (json['AttackPropertyIdentifier'] as String?)
        ?.toAttackPropertyIdentifier(),
    topContributors: (json['TopContributors'] as List?)
        ?.whereNotNull()
        .map((e) => Contributor.fromJson(e as Map<String, dynamic>))
        .toList(),
    total: json['Total'] as int?,
    unit: (json['Unit'] as String?)?.toUnit(),
  );
}