Skip to content

Conversation

dfabulich
Copy link
Contributor

The ComposeContext now tracks an additional variable, scope, which users can use in ComposeView or ComposeModifierView to access scoped modifiers. https://developer.android.com/develop/ui/compose/modifiers#scope-safety

I've also added a new variant of .composeModifier(scope:) that allows users to declare a class to which their (Modifier) -> Modifier function will be scoped, making it easy to access modifiers scoped to that class.

Finally, I've set the scope variable in LazyHStack, LazyVStack, LazyHGrid, and LazyVGrid. There are probably a lot more places where this could be set.

Thank you for contributing to the Skip project! Please use this space to describe your change and add any labels (bug, enhancement, documentation, etc.) to help categorize your contribution.

Skip Pull Request Checklist:

  • REQUIRED: I have signed the Contributor Agreement
  • REQUIRED: I have tested my change locally with swift test
  • OPTIONAL: I have tested my change on an iOS simulator or device
  • OPTIONAL: I have tested my change on an Android emulator or device

The `ComposeContext` now tracks an additional variable, `scope`, which users can use in `ComposeView` or `ComposeModifierView` to access scoped modifiers. https://developer.android.com/develop/ui/compose/modifiers#scope-safety

I've also added a new variant of `.composeModifier(scope:)` that allows users to declare a class to which their `(Modifier) -> Modifier` function will be scoped, making it easy to access modifiers scoped to that class.

Finally, I've set the `scope` variable in `LazyHStack`, `LazyVStack`, `LazyHGrid`, and `LazyVGrid`. There are probably a lot more places where this could be set.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant