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
theme =AuthUITheme.Adaptive// Adapts to system dark mode
1015
+
}
1016
+
```
1017
+
1018
+
This is the recommended approach for most apps as it provides a seamless experience that respects the user's system preferences.
1019
+
1020
+
**Note:**`Adaptive` is a `@Composable` property that evaluates to `Default` (light) or `DefaultDark` (dark) based on `isSystemInDarkTheme()` at composition time.
1021
+
1003
1022
### Customizing Default Theme
1004
1023
1005
1024
Use `.copy()` to customize specific properties of the default theme:
AuthUITheme(theme =AuthUITheme.DefaultDark) { // DARK wrapper
1117
+
FirebaseAuthScreen(configuration, ...)
1118
+
}
1119
+
// Result: FirebaseAuthScreen inherits DARK theme from wrapper
1120
+
```
1121
+
1122
+
3.**Ultimate fallback:**
1123
+
```kotlin
1124
+
val configuration = authUIConfiguration {
1125
+
// theme not specified (null)
1126
+
}
1127
+
1128
+
FirebaseAuthScreen(configuration, ...) // No wrapper
1129
+
// Result: Uses AuthUITheme.Default (light theme)
1130
+
```
1131
+
1132
+
**Best Practice:** For clarity and consistency, always set `theme` in `authUIConfiguration`. Use the wrapper only if you have additional UI outside `FirebaseAuthScreen`.
1133
+
1018
1134
### Inheriting from Material Theme
1019
1135
1020
1136
Use `fromMaterialTheme()` to automatically inherit your app's Material Design theme:
0 commit comments