profileDataToJson function

String profileDataToJson(
  1. ProfileModel data
)

Converts a ProfileModel object into a JSON string.

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

data: The ProfileModel object to be converted.

Returns a JSON string representation of the ProfileModel.

Implementation

String profileDataToJson(ProfileModel data) => json.encode(data.toJson());