UpgradeHistory.fromJson constructor

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

Implementation

factory UpgradeHistory.fromJson(Map<String, dynamic> json) {
  return UpgradeHistory(
    startTimestamp: timeStampFromJson(json['StartTimestamp']),
    stepsList: (json['StepsList'] as List?)
        ?.whereNotNull()
        .map((e) => UpgradeStepItem.fromJson(e as Map<String, dynamic>))
        .toList(),
    upgradeName: json['UpgradeName'] as String?,
    upgradeStatus: (json['UpgradeStatus'] as String?)?.toUpgradeStatus(),
  );
}