shortenParamForLog function

dynamic shortenParamForLog(
  1. dynamic value, {
  2. int keep = 1000,
})

Implementation

dynamic shortenParamForLog(dynamic value, {int keep = 1000}) {
  if (value is String) {
    if (value.length > keep) {
      return value.substring(0, keep - 1);
    }
  }
  return value;
}