toMap method

Map<String, dynamic> toMap()

Convert to map for serialization

Implementation

Map<String, dynamic> toMap() {
  final map = <String, dynamic>{};

  if (top != null) map['top'] = top;
  if (bottom != null) map['bottom'] = bottom;
  if (left != null) map['left'] = left;
  if (right != null) map['right'] = right;

  return map;
}