toJson method

  1. @override
Map<String, Object?> toJson()

Implementation

@override
Map<String, Object?> toJson() => {
      "type": encodeValue(type),
      if (name != null) "name": encodeValue(name),
      if (phone != null) "phone": encodeValue(phone),
      if (email != null) "email": encodeValue(email),
    };