toJson method
Converts the instance to a JSON map.
Implementation
@override
Map<String, Object?> toJson() => {
'id': id,
'name': name,
if (attributes != null) 'attributes': attributes,
if (createdDate != null)
'createdDate': createdDate!.millisecondsSinceEpoch,
if (lastAuthenticatedDate != null)
'lastAuthenticatedDate':
lastAuthenticatedDate!.millisecondsSinceEpoch,
if (lastModifiedDate != null)
'lastModifiedDate': lastModifiedDate!.millisecondsSinceEpoch,
};