Piotr Prus

    Piotr Prus

    1 year ago
    Is there a way to connect LocalProvider with the Kotlin FLow? I am trying to change dynamically the LocalProvider with DataStore flow.
    Albert Chang

    Albert Chang

    1 year ago
    CompositionLocalProvider(LocalValue provides flow.collectAsState().value)
    should work.
    Piotr Prus

    Piotr Prus

    1 year ago
    Awesome. It is working! I just needed to add initialValue in collectAsState(initialValue = “”)