logJson function

void logJson(
  1. dynamic data
)

Implementation

void logJson(dynamic data) {
  try {
    var json = jsonEncode(data is BasicModel ? data.toMap() : data);
    log(json);
  } catch (e) {
    log(e);
  }
}