Umm... what the hell? Hey I could use a little bit...
# compose
j
Umm... what the hell? Hey I could use a little bit of help, this was working just fine and I made no changes in code
Copy code
var songAdditon by remember { mutableStateOf(StateWrapper(initialState)) }
        FlowColumn(modifier = Modifier.fillMaxWidth().fillMaxHeight().border(
            BorderStroke(2.dp, Color.Red)
        ), verticalArrangement = Arrangement.SpaceEvenly) {
            Box(modifier = Modifier.align(Alignment.CenterHorizontally).fillMaxWidth()){
                TextField(
                    modifier = Modifier.align(Alignment.Center),
                    label = {SongAddition::name.asTextField()},
                    value = songAdditon.state.name,
                    isError = (SongAddition::name asErrorFrom songAdditon.error.error),
                    supportingText = {SongAddition::name asErrorTextFrom songAdditon.error.error},
                    onValueChange = { txt: String ->
                        songAdditon = songAdditon.copy(
                            state = songAdditon.state.copy(name = txt)
                        )
                    })
            }
            Box(modifier = Modifier.align(Alignment.CenterHorizontally).fillMaxWidth()){
                TextField(modifier = Modifier.align(Alignment.Center),
                    label = { SongAddition::path.asTextField() },
                    isError = (SongAddition::path asErrorFrom songAdditon.error.error),
                    supportingText = {SongAddition::path asErrorTextFrom songAdditon.error.error},
                    value = songAdditon.state.path,
                    onValueChange = { txt: String ->
                        songAdditon = songAdditon.copy(
                            state = songAdditon.state.copy(path = txt)
                        )
                    })
            }
            Box(modifier = Modifier.align(Alignment.CenterHorizontally).fillMaxWidth()){
                TextField(modifier = Modifier.align(Alignment.Center),
                    label = { SongAddition::uploader.asTextField() },
                    isError = (SongAddition::uploader asErrorFrom songAdditon.error.error),
                    supportingText = {SongAddition::uploader asErrorTextFrom songAdditon.error.error},
                    value = songAdditon.state.uploader ?: "",
                    onValueChange = { txt ->
                        songAdditon = songAdditon.copy(
                            state = songAdditon.state.copy(uploader = txt)
                        )
                    })
            }
                Button(
                    onClick = {
                              songAdditon = songAdditon.state.updateViewModel()
                    },
                    modifier = Modifier.align(Alignment.CenterHorizontally)
                ) {
                    Text("TEST")
                }


        }
Copy code
implementation("com.mohamedrejeb.calf:calf-file-picker:0.1.1")
ITS THIS STUPID THING
This library causes this error just by importing it, not even using it. So anyone gonna try and argue its not poorly designed?
e
FlowColumn
is marked as
@ExperimentalLayoutApi
, meaning that its API is not final, subject to change between releases, and should not be used by public libraries
there are hard checks ensuring that the stable parts of the API remain stable
j
Right so if its using something unstable, then thats poorly designed right?
e
there can be valid uses of experimental APIs, but they should not be in public libraries that are used by consumers with possibly varying dependencies versions
if it's all within a codebase you fully control, go ahead
j
My codebase uses it, but im not making a pulbic library
Arrrrrg this is so damn frustrating
I cant even find out how to update the framework
e
if that is different than the version you are using in your own library, then when you mix them together, Gradle will resolve the conflict to the newer of the versions
j
some github issue says that he requires beta02, I am on 01
e
1.5.1 is released (and part of the 2023.09.00 BOM), so unless you're targeting other platforms I'd recommend targeting that instead of an earlier beta
j
actually my compose multiplatform target is 1.4.3
And of course the only way to know what got updated is through tracking the commits... annoying
Thanks for the help @ephemient I upgraded and then fixed the resulting broken codebase. It seems stable now