safeExecuteAsync function
Implementation
Future<void> safeExecuteAsync(
Future<void> Function()? callback, {
String? context,
}) async {
if (callback == null) return;
try {
await callback();
} catch (e, stackTrace) {
_logSecurity(
'Button async callback error${context != null ? ' in $context' : ''}: $e',
stackTrace: stackTrace,
);
}
}