'How to handle Shape when creating a theme for Material Design 3 for compose

I currently have an app written in jetpack compose which uses Material-Theming-Support from androidx.compose.material:material.

from / import androidx.compose.material.MaterialTheme

@Composable
fun MaterialTheme(
    colors: Colors = MaterialTheme.colors,
    typography: Typography = MaterialTheme.typography,
    shapes: Shapes = MaterialTheme.shapes,
    content: @Composable () -> Unit
)

I now plan to migrate to Material3: androidx.compose.material3:material3 (still in alpha, i know).

However, the theme-composable now doesn't allow any shapes anymore

from / import androidx.compose.material3.MaterialTheme

@Composable
fun MaterialTheme(
    colorScheme: ColorScheme = MaterialTheme.colorScheme,
    typography: Typography = MaterialTheme.typography,
    content: @Composable () -> Unit
)

What should i do now with my old shape definitions? The material-website only talks how to do that in xml & the old view-system.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source