convertChatMessageStatusDetailToJson function

String convertChatMessageStatusDetailToJson(
  1. String? str
)

Converts a nullable JSON string to a non-nullable JSON string.

If the input string is null or empty, this function returns an empty string. Otherwise, it converts the input string to a ChatMessageStatusDetail instance using chatMessageStatusDetailFromJson, and then serializes it back to a JSON string using chatMessageStatusDetailToJson.

str: The nullable JSON string to convert.

Returns a non-nullable JSON string.

Implementation

String convertChatMessageStatusDetailToJson(String? str) =>
    (str == null || str.isEmpty)
        ? ""
        : chatMessageStatusDetailToJson(chatMessageStatusDetailFromJson(str));