toJson method
Implementation
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
if (top != null) {
map['top'] = top?.toJson();
}
if (bottom != null) {
map['bottom'] = bottom?.toJson();
}
if (left != null) {
map['left'] = left?.toJson();
}
if (right != null) {
map['right'] = right?.toJson();
}
return map;
}