Capturable
@Composable
Content copied to clipboard
A composable with content which supports to capture ImageBitmap from a content.
Example usage:
val captureController = rememberCaptureController()
Capturable(
controller = captureController,
onCaptured = { bitmap, error ->
// Do something with [bitmap]
// Handle [error] if required
}
) {
// Composable content
}
Button(onClick = {
// Capture content
captureController.capture()
}) { ... }
Content copied to clipboard
Parameters
controller
A CaptureController which gives control to capture the content.
modifier
The Modifier to be applied to the layout.
on Captured
The callback which gives back ImageBitmap after composable is captured. If any error is occurred while capturing bitmap, Throwable is provided.
content
Composable content to be captured.