You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By default, `ThemeState` is initialized with pre-defined dark and light themes in the `design` module. To edit these themes:
22
+
By default, `ThemeState` is initialized with pre-defined dark and light themes in the `presentation` module. To edit these themes:
23
23
24
24
1. Visit the [Material 3 Theme Builder](https://m3.material.io/theme-builder#/custom).
25
25
2. Customize the desired color theme.
26
26
3. Click on the **Export** button and confirm exporting as **Jetpack Compose (Theme.kt)**.
27
-
4. Paste the exported files (**Theme.kt** and **Color.kt**) into the package `shared.presentation.theme` of the `design` module and update their package declaration accordingly.
28
-
5. In the `Theme.kt` file add the following snippet:
27
+
4. Paste the exported files (**Theme.kt** and **Color.kt**) into the package `shared.presentation.theme.m3` of the `presentation` module and update their package declaration accordingly.
28
+
5. In the `Themes.kt` file add the following snippet:
29
29
```kotlin
30
-
valLightTheme=AppTheme(
31
-
dark =false,
32
-
id ="material_3_light",
33
-
colorScheme =LightColors
34
-
)
35
-
36
-
valDarkTheme=AppTheme(
37
-
dark =true,
38
-
id ="material_3_dark",
39
-
colorScheme =DarkColors
40
-
)
30
+
object Themes {
31
+
valLight=Theme(
32
+
dark =false,
33
+
id ="material_3_light",
34
+
colorScheme = lightScheme
35
+
)
36
+
37
+
valDark=Theme(
38
+
dark =true,
39
+
id ="material_3_dark",
40
+
colorScheme = darkScheme
41
+
)
42
+
}
41
43
```
42
44
43
-
The themes can be declared directly in the app module. However, if you plan to use feature modules, it might be beneficial to declare the theme in the `design` module.
45
+
The themes can be declared directly in the app module. However, if you plan to use feature modules, it might be beneficial to declare the theme in the `presentation` module.
Includes showcases with all selected features in the project. These showcases are displayed as the initial app screen and must be manually removed when no longer necessary.
0 commit comments