toJson method Null safety

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  return {
    "heading": _heading,
    "box": _box,
    "card": _card,
  };
}