toJson method

Map<String, dynamic> toJson()

Converts this LocationConstraint object to a JSON object.

Each parameter of LocationConstraint corresponds to a key in the resulting JSON object.

Implementation

Map<String, dynamic> toJson() {
  return {
    'isRequired': isRequired,
    'suggestLocation': suggestLocation,
    'locations': locations?.map((e) => e?.toJson()).toList(),
  };
}