Skip to content

syntax in readMe example #3

Description

@randyheaton

In the usage example in the readMe, you use:

val zoomState by remember { ZoomState(pinchZoomEnabled = true) }

I think the intent is:

val zoomState:ZoomState = remember{ ZoomState(true) }

edit: Since a lot of these things, like preview in particular, are nullable and it's useful to change their value later, I'm thinking the original intent was probably:

var zoomState by remember { mutableStateOf(ZoomState(pinchZoomEnabled = true)) }

My only real purpose here is to say that there looks like a versioning issue where either an "=" got switched with a "by" or the mutableStateOf() got dropped.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions