Map<String, dynamic> toJson() { return { if (top != null) 'top': top, if (left != null) 'left': left, if (bottom != null) 'bottom': bottom, if (right != null) 'right': right, }; }