to62Format method

String to62Format({
  1. String? costume,
})

Implementation

String to62Format({String? costume}) {
  if (length < 4) return this;
  // if (substring(0, 3) == (costume ?? '62')) return substring(1);
  if (substring(0, 3) == (costume ?? '62')) return this;
  // AppLogger.logData(message: substring(0, 3));
  if (substring(0, 2) == (costume ?? '62')) return this;
  // AppLogger.logData(message: substring(0, 3));
  if (this[0] == '0' && costume == '62') return '${costume ?? '62'}${substring(1)}';
  return '${costume ?? '62'}$this';
}