ClipboardInteractions extension
Simulates a platform clipboard in widget tests.
The simulation is achieved by using a SimulatedClipboard. See that class for more details about how the simulation works.
- on
Methods
-
clearSimulatedClipboard(
) → void - Clears any content that was stored within a simulated clipboard and stops simulating the clipboard.
-
getSimulatedClipboardContent(
) → String? -
Returns the content stored within the simulated clipboard, or
null
if no clipboard is currently simulated. -
setSimulatedClipboardContent(
String content) → Future< void> -
Makes the given
content
available from the Clipboard as if the user copied thecontent
to the platform clipboard. -
simulateClipboard(
) → void - Simulates clipboard access for widget tests, which can't access a real platform keyboard.