safeOTPVoidCallback function
Safely executes a void callback with error handling.
Implementation
void safeOTPVoidCallback(
VoidCallback? callback, {
String context = 'OTP void callback',
}) {
if (callback == null) return;
try {
callback();
} catch (e, stack) {
if (OTPSecurityConfig.enableSecurityLogging) {
debugPrint('[SAC OTP Security] $context error: $e');
debugPrint('$stack');
}
}
}