mirror of
https://github.com/BetterAndroid/FlexiUI.git
synced 2025-09-07 19:14:12 +08:00
refactor: make Sizes experimental
This commit is contained in:
@@ -25,6 +25,7 @@ kotlin {
|
||||
sourceSets {
|
||||
all {
|
||||
languageSettings {
|
||||
optIn("com.highcapable.flexiui.ExperimentalFlexiUISizesApi")
|
||||
optIn("androidx.compose.ui.ExperimentalComposeUiApi")
|
||||
optIn("androidx.compose.foundation.ExperimentalFoundationApi")
|
||||
}
|
||||
|
@@ -28,8 +28,7 @@ import androidx.compose.runtime.staticCompositionLocalOf
|
||||
import androidx.compose.ui.unit.Dp
|
||||
import androidx.compose.ui.unit.dp
|
||||
|
||||
// TODO: Some sizes will modify in the future
|
||||
|
||||
@ExperimentalFlexiUISizesApi
|
||||
@Immutable
|
||||
data class Sizes(
|
||||
val spacingPrimary: Dp,
|
||||
@@ -61,4 +60,18 @@ internal val DefaultSizes = Sizes(
|
||||
borderSizePrimary = 2.dp,
|
||||
borderSizeSecondary = 1.dp,
|
||||
borderSizeTertiary = 0.dp
|
||||
)
|
||||
)
|
||||
|
||||
/**
|
||||
* The [Sizes] is experimental, the relevant design specifications for size are still being improved,
|
||||
* this is the old design plan.
|
||||
*
|
||||
* Some sizes will modify in the future.
|
||||
*/
|
||||
@RequiresOptIn(
|
||||
message = "The Sizes is experimental, the relevant design specifications for size are still being improved, this is the old design plan.\n" +
|
||||
"Some sizes will modify in the future.",
|
||||
level = RequiresOptIn.Level.WARNING
|
||||
)
|
||||
@MustBeDocumented
|
||||
annotation class ExperimentalFlexiUISizesApi
|
Reference in New Issue
Block a user