Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ val colorSchemeForDarkMode = darkColorScheme(
primaryContainer = primaryContainerDark,
onPrimaryContainer = onPrimaryContainerDark,
secondary = secondaryDark,
surfaceTint = primaryDark,
onSecondary = onSecondaryDark,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For consistency with the darkColorScheme function signature and to improve readability, surfaceTint should be grouped with the other surface* properties. Please remove it from here and add surfaceTint = primaryDark, after onSurfaceVariant = onSurfaceVariantDark (around line 99).

Suggested change
secondary = secondaryDark,
surfaceTint = primaryDark,
onSecondary = onSecondaryDark,
secondary = secondaryDark,
onSecondary = onSecondaryDark,

secondaryContainer = secondaryContainerDark,
onSecondaryContainer = onSecondaryContainerDark,
Expand All @@ -106,7 +107,6 @@ val colorSchemeForDarkMode = darkColorScheme(
onErrorContainer = onErrorContainerDark,
)

// Todo: specify surfaceTint
val colorSchemeForLightMode = lightColorScheme(
primary = primaryLight,
onPrimary = onPrimaryLight,
Expand All @@ -125,6 +125,7 @@ val colorSchemeForLightMode = lightColorScheme(
background = backgroundLight,
onBackground = onBackgroundLight,
surface = surfaceLight,
surfaceTint = primaryLight,
onSurface = onSurfaceLight,
surfaceVariant = surfaceVariantLight,
onSurfaceVariant = onSurfaceVariantLight,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

To maintain consistency with the function signature of lightColorScheme and improve readability, it's best to place surfaceTint after all other surface* properties.

Suggested change
surface = surfaceLight,
surfaceTint = primaryLight,
onSurface = onSurfaceLight,
surfaceVariant = surfaceVariantLight,
onSurfaceVariant = onSurfaceVariantLight,
surface = surfaceLight,
onSurface = onSurfaceLight,
surfaceVariant = surfaceVariantLight,
onSurfaceVariant = onSurfaceVariantLight,
surfaceTint = primaryLight,

Expand Down