@file:Suppress("NOTHING_TO_INLINE", "UnusedReceiverParameter") @file:SuppressLint("ModifierFactoryUnreferencedReceiver") import android.annotation.SuppressLint import androidx.compose.foundation.layout.fillMaxHeight import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.wrapContentHeight import androidx.compose.foundation.layout.wrapContentSize import androidx.compose.foundation.layout.wrapContentWidth import androidx.compose.ui.Modifier import kotlin.DeprecationLevel.ERROR /** * Fake modifier to teach Compose's centering idiom. In Compose, the way you center something is to * use [fillMaxSize] to fill the maximum incoming constraints, and then [wrapContentSize] to allow the * content to be as small as it wants and center it in the available space. */ @Deprecated( "Use fillMaxSize().wrapContentSize() instead.", ReplaceWith( "fillMaxSize().wrapContentSize()", "androidx.compose.foundation.layout.fillMaxSize", "androidx.compose.foundation.layout.wrapContentSize" ), level = ERROR ) public inline fun Modifier.center(): Modifier = error("Use fillMaxSize().wrapContentSize() instead.") /** * Fake modifier to teach Compose's centering idiom. In Compose, the way you center something is to * use [fillMaxWidth] to fill the maximum incoming constraints, and then [wrapContentWidth] to allow * the content to be as small as it wants and center it in the available space. */ @Deprecated( "Use fillMaxHeight().wrapContentHeight() instead.", ReplaceWith( "fillMaxHeight().wrapContentHeight()", "androidx.compose.foundation.layout.fillMaxHeight", "androidx.compose.foundation.layout.wrapContentHeight" ), level = ERROR ) public inline fun Modifier.centerVertically(): Modifier = error("Use fillMaxHeight().wrapContentHeight() instead.") /** * Fake modifier to teach Compose's centering idiom. In Compose, the way you center something is to * use [fillMaxHeight] to fill the maximum incoming constraints, and then [wrapContentHeight] to allow * the content to be as small as it wants and center it in the available space. */ @Deprecated( "Use fillMaxWidth().wrapContentWidth() instead.", ReplaceWith( "fillMaxWidth().wrapContentWidth()", "androidx.compose.foundation.layout.fillMaxWidth", "androidx.compose.foundation.layout.wrapContentWidth" ), level = ERROR ) public inline fun Modifier.centerHorizontally(): Modifier = error("Use fillMaxWidth().wrapContentWidth() instead.")