79692174

Date: 2025-07-06 23:36:12
Score: 0.5
Natty:
Report link

The ClipboardManager interface was deprecated in favor of Clipboard interface.

  1. Change all import androidx.compose.ui.platform.LocalClipboardManager to import androidx.compose.ui.platform.LocalClipboard and LocalClipboardManager to LocalClipboard

  2. Make the caller function suspend or use rememberCoroutineScope().launch { ... }

  3. If you were using function setText(AnnotatedString(text)), then you can replace it with setClipEntry(ClipEntry(ClipData.newPlainText(text, text)))

Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Jiří