toState method
Implementation
State toState() {
switch (this) {
case 'DRAFT':
return State.draft;
case 'ACTIVE':
return State.active;
case 'COMPLETED':
return State.completed;
case 'CANCELLED':
return State.cancelled;
case 'CLOSED':
return State.closed;
}
throw Exception('$this is not known in enum State');
}