MD5 function

String MD5(
  1. String? input
)

✅ IMPROVED: MD5 hash with null safety

Implementation

// ignore: non_constant_identifier_names
String MD5(String? input) {
  if (input == null || input.isEmpty) return '';

  try {
    return md5.convert(utf8.encode(input)).toString();
  } catch (e) {
    debugPrint('❌ MD5 error: $e');
    return '';
  }
}