Progress.fromJson constructor
Progress.fromJson(
- Map<String, dynamic> json
)
Implementation
factory Progress.fromJson(Map<String, dynamic> json) {
return Progress(
id: json['id'] as String?,
category: json['category'] as String?,
parentId: json['parentId'] as String?,
progressPercentage: json['progressPercentage'] != null
? (json['progressPercentage'] is String && json['progressPercentage'].toLowerCase() == "nan") ? double.nan : (json['progressPercentage'] as num).toDouble()
: null,
progressSeconds: json['progressSeconds'] as int?,
completions: json['completions'] as int?,
);
}