toMap method
Implementation
Map<String, dynamic> toMap() {
return {
'name': 'PAGE_VIEW', // PAGE_VIEW is required
'category': category,
if(subCategory != null && subCategory != '') 'subCategory': subCategory,
'sessionId': sessionId,
'userId': userId,
'device': device,
'os': os,
'lang': lang,
};
}