toJson method

Map<String, dynamic> toJson()

Serializes this state to a JSON-compatible map.

Implementation

Map<String, dynamic> toJson() => {
  'id': id,
  'role': role.name,
  'status': status.name,
  'currentTaskId': currentTaskId,
  'lastActivity': lastActivity.toIso8601String(),
};