toJson method
Implementation
Map<String, dynamic> toJson() {
return {
DeviceType.phone.name: rectSingleTojson(rectPhone),
DeviceType.tablet.name: rectSingleTojson(rectTablet),
DeviceType.laptop.name: rectSingleTojson(rectLaptop ?? rectDesktop),
DeviceType.desktop.name: rectSingleTojson(rectDesktop),
};
}