toJson method

  1. @override
Map toJson()
override

Serialize instance to JSON Object

Implementation

@override
Map toJson() {
  var fromObject = super.toJson();
  fromObject.addAll({
    "visitorFound": visitorFound,
    "ipAddress": ipAddress,
    "ipLocation": ipLocation?.toJson(),
    "osName": osName,
    "osVersion": osVersion,
    "device": device,
    "firstSeenAt": firstSeenAt.toJson(),
    "lastSeenAt": lastSeenAt.toJson(),
  });

  return fromObject;
}