showNotificationForLogger static method

Future<void> showNotificationForLogger(
  1. LogEntry logEntry
)

Implementation

static Future<void> showNotificationForLogger(LogEntry logEntry) async {
  if (!await isHaveNotificationPermission()) {
    return;
  }
  await showNotification(
    id: 1,
    title: "${logEntry.request?.method}: ${logEntry.request?.path}",
    body:
        "Status: ${logEntry.response?.statusCode} - ${logEntry.response?.statusMessage}",
    payload: apiLogPayload,
  );
}