convertStatusListFromJson function
Converts a nullable JSON string into a non-nullable JSON string representing a list of Status objects.
If the input string is null or empty, this function returns an empty string. Otherwise, it decodes the string into a list of Status objects using statusListFromJson, and then serializes the list back into a JSON string using statusListToJson.
str
: The nullable JSON string to convert.
Returns a non-nullable JSON string.
Implementation
String convertStatusListFromJson(String? str) => (str == null || str.isEmpty)
? ""
: statusListToJson(statusListFromJson(str));