profileDetailToJson function

String profileDetailToJson(
  1. ProfileDetails data
)

Converts a single ProfileDetails object into a JSON string.

This function takes a ProfileDetails object, converts it to a map using the toJson method, and then encodes the map as a JSON string.

Parameters: data - A ProfileDetails object.

Returns: A JSON string representing the profile detail.

Implementation

String profileDetailToJson(ProfileDetails data) => json.encode(data.toJson());