ComposePrefs3 icon indicating copy to clipboard operation
ComposePrefs3 copied to clipboard

Cannot perform operation for Unspecified type.

Open zhuker opened this issue 1 year ago • 1 comments

I added SettingsScreen.kt from the repo to my project and launched it as a preview I get this error

 java.lang.IllegalArgumentException: Cannot perform operation for Unspecified type.
           at androidx.compose.ui.unit.TextUnitKt.checkArithmetic--R2X_6o(TextUnit.kt:344)
           at com.jamal.composeprefs3.ui.GroupHeaderKt.GroupHeader-iJQMabo(GroupHeader.kt:74)

zhuker avatar Oct 23 '23 22:10 zhuker

Got the same issue; it fails on this line in the GroupHeader:

fontSize = LocalTextStyle.current.fontSize.times(FontSizeMultiplier)

It looks like LocalTextStyle.current.fontSize has a problem because in checkArithmetic, isUnspecified is true?

EDIT: It's because I upgraded to M3 recently and I was using the M2 version of the lib. Just use the version of the library corresponding to your material version.

nathanfallet avatar Feb 01 '24 19:02 nathanfallet