Compose Unstyled 2.0 is out! Check the official announcement blog ->
Object

ComposeMaterial3Flags

The object holding the feature flags.

Source set: Common
@ExperimentalMaterial3Api
object ComposeMaterial3Flags

The object holding the feature flags.

Developers can enable or disable experimental or migration-based features by modifying the boolean values within this object. These flags are considered temporary. They are expected to be removed and should not be relied upon as permanent configuration.

Usage:

class MyApplication : Application() {   override fun onCreate() {       ComposeMaterial3Flags.someFeatureEnabled = true       super.onCreate()   }
}

Properties

isCheckboxStylingFixEnabled

Source set: Common
@JvmField var isCheckboxStylingFixEnabled: Boolean

When the flag is true, the Checkbox will use Material Design 3 styling, including updated colors and container sizing. When false, it uses older Material Design 2 styling. See the Material Design 2 Checkboxes Specs and the Material Design 3 Checkboxes Specs.

isSnackbarStylingFixEnabled

Source set: Common
@JvmField var isSnackbarStylingFixEnabled: Boolean

When this flag is true, the Snackbar component will use an updated layout implementation that correctly handles vertical alignment for multi-line text.

isPrecisionPointerComponentSizingEnabled

Source set: Common
@JvmField
var isPrecisionPointerComponentSizingEnabled: Boolean

When this flag is true and a precision pointer is present, components are resized accordingly

isAnchoredDraggableComponentsStrictOffsetCheckEnabled

Source set: Common
@JvmField
var isAnchoredDraggableComponentsStrictOffsetCheckEnabled: Boolean

This flag affects Material3 components that use androidx.compose.foundation.gestures.anchoredDraggable. Those are: BottomSheetScaffold, ModalBottomSheet, SwipeToDismissBox and WideNavigationRail.

When this flag is set to true, these components will require their internal offset to be initialized during measurement before they are placed, throwing an exception if the offset was not initialized in placement. When this flag is set to false, the component will not throw an exception and won't place the content while their internal offset is not initialized. The content will be placed as soon as the offset is initialized.

This flag can be helpful if you are encountering a crash with an uninitialized offset (such as https://issuetracker.google.com/issues/477038695) and will be removed when the associated bugs are fixed.

isAnchoredDraggableComponentsInvalidationFixEnabled

Source set: Common
@JvmField
var isAnchoredDraggableComponentsInvalidationFixEnabled: Boolean

This flag affects Material3 components that use androidx.compose.foundation.gestures.anchoredDraggable. Those are: BottomSheetScaffold, ModalBottomSheet, SwipeToDismissBox and WideNavigationRail.

When this flag is set to true, these components will recalculate their anchor points when the instance of their respective state changes and remeasure. When this flag is set to false, no additional remeasure is performed when the state instance changes.

isBottomSheetPartiallyExpandedDeterministicEnabled

Source set: Common
@JvmField
var isBottomSheetPartiallyExpandedDeterministicEnabled: Boolean

This flag affects BottomSheet and ModalBottomSheet.

When true (default), BottomSheet will always include SheetValue.PartiallyExpanded if provided in SheetState.enabledValues, converging it with SheetValue.Expanded for small sheets.

When false, the legacy auto-exclusion logic is enabled.

Last updated: