toMap method
Implementation
@override
Map<String, Object?> toMap() {
final data = <String, Object?>{
'yOffset': yOffset,
'xOffset': xOffset,
'viewHeight': viewHeight,
'viewWidth': viewWidth,
'contentHeight': contentHeight,
'contentWidth': contentWidth,
};
data.removeWhere((key, value) => value == null);
return data;
}