decodeJson function

Map<String, dynamic> decodeJson(
  1. dynamic data
)

Implementation

Map<String, dynamic> decodeJson(dynamic data) {
  if (data is String) {
    return json.decode(data);
  }
  if (data.isEmpty) {
    return <String, dynamic>{};
  }
  return data;
}