create Mdc Theme
This function creates the components of a androidx.compose.material.MaterialTheme, reading the values from an Material Components for Android theme.
By default the text colors from any associated TextAppearances from the theme are not read. This is because setting a fixed color in the resulting TextStyle breaks the usage of androidx.compose.material.ContentAlpha through androidx.compose.material.LocalContentAlpha. You can customize this through the setTextColors parameter.
For Shapes, the layoutDirection is taken into account when reading corner sizes of ShapeAppearances from the theme. For example, Shapes.medium.topStart will be read from cornerSizeTopLeft for LayoutDirection.Ltr and cornerSizeTopRight for LayoutDirection.Rtl.
The individual components of the returned ThemeParameters may be null, depending on the matching 'read' parameter. For example, if you set readColors to false, ThemeParameters.colors will be null.
Return
ThemeParameters instance containing the resulting Colors, Typography and Shapes.
Parameters
The context to read the theme from.
The layout direction to be used when reading shapes.
The current density.
whether the read the MDC color palette from the context's theme.
whether the read the MDC text appearances from context's theme.
whether the read the MDC shape appearances from the context's theme.
whether to read the colors from the TextAppearances associated from the theme. Defaults to false.
whether to read and prioritize the fontFamily attributes from context's theme, over any specified in the MDC text appearances. Defaults to false.