/// Create or update a commitment. class CommitmentRequest { String? id; String type; String commitmentClass; String title; String category; String dueStart; String dueEnd; int estMinutes; String energy; String proofType; int proofTimerMinutes; String rrule; CommitmentRequest({ this.id, this.type = "TASK", this.commitmentClass = "Standard", this.title = "", this.category = "", this.dueStart = "", this.dueEnd = "", this.estMinutes = 0, this.energy = "Medium", this.proofType = "Honour", this.proofTimerMinutes = 0, this.rrule = "", }); Map toJson() { final Map data = {}; data['id'] = id; data['type'] = type; data['commitmentClass'] = commitmentClass; data['title'] = title; data['category'] = category; data['dueStart'] = dueStart; data['dueEnd'] = dueEnd; data['estMinutes'] = estMinutes; data['energy'] = energy; data['proofType'] = proofType; data['proofTimerMinutes'] = proofTimerMinutes; data['rrule'] = rrule; return data; } }