Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose public constructor of CaptureController #145

Closed
PatilShreyas opened this issue Feb 25, 2024 · 1 comment · Fixed by #148
Closed

Expose public constructor of CaptureController #145

PatilShreyas opened this issue Feb 25, 2024 · 1 comment · Fixed by #148
Labels
enhancement New feature or request

Comments

@PatilShreyas
Copy link
Owner

If for certain use cases, instance of CaptureController needs to be created globally, like follows:

class MyComposeActivity : ComponentActivity {
  val controller = CaptureController()

  override fun onCreate(savedInstanceState: Bundle?) {
    setContent {
      // do something with `controller` in Compose scope
    }
  }
}

Currently, only rememberCaptureController() function is exposed which can be only called from @Composable function.

@PatilShreyas
Copy link
Owner Author

This has been fixed and released in v2.1.0 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant