replaceKey method

String replaceKey(
  1. String key, [
  2. bool needReplaceCross = true
])

Implementation

String replaceKey(String key, [bool needReplaceCross = true]) {
  if (needReplaceCross) {
    return key.toUpperCase().replaceAll("-", "_");
  }
  return key.toUpperCase();
}