hexAddPrefix function

String hexAddPrefix(
  1. String? value
)

Implementation

String hexAddPrefix(String? value) {
  if (value != null && hexHasPrefix(value)) {
    return value;
  }
  final prefix = (value != null && value.length % 2 == 1) ? '0' : '';
  return "0x$prefix${value ?? ''}";
}