toJson method
Implementation
Map<String, dynamic> toJson() => {
'id': id,
'message': message,
'fromDevice': 'mobile',
'ip': ip,
'type': type,
'title': title,
'source': 'Feed',
'createdAt': createdAt != null
? '${createdAt!.year.toString().padLeft(4, '0')}-${createdAt!.month.toString().padLeft(2, '0')}-${createdAt!.day.toString().padLeft(2, '0')} '
'${createdAt!.hour.toString().padLeft(2, '0')}:${createdAt!.minute.toString().padLeft(2, '0')}:${createdAt!.second.toString().padLeft(2, '0')}:${createdAt!.millisecond.toString().padLeft(2, '0')}'
: null,
};