Audit 9b: Dynamic color (Material You) + 48dp min touch target helpers

Dynamic color opt-in on Android 12+ via expect/actual DynamicColor:
- commonMain: expect isDynamicColorSupported() + rememberDynamicColorScheme()
- androidMain: SDK>=31 gate, dynamicLight/DarkColorScheme(context)
- iOS/JVM/JS/WASM: no-op actuals
- ThemeManager gains useDynamicColor StateFlow, persisted via ThemeStorage
- App.kt wires both currentTheme + useDynamicColor into HoneyDueTheme
- ThemeSelectionScreen exposes the "Use system colors" toggle

Touch target helpers:
- Modifier.minTouchTarget(48.dp) + Modifier.clickableWithRipple
- Applied at audit-flagged sites in CompleteTaskScreen

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Trey T
2026-04-18 17:39:22 -05:00
parent 214908cd5c
commit ba1ec2a69b
15 changed files with 314 additions and 19 deletions

View File

@@ -151,8 +151,9 @@ fun App(
}
val currentTheme by remember { derivedStateOf { ThemeManager.currentTheme } }
val useDynamicColor by remember { derivedStateOf { ThemeManager.useDynamicColor } }
HoneyDueTheme(themeColors = currentTheme) {
HoneyDueTheme(themeColors = currentTheme, useDynamicColor = useDynamicColor) {
// Handle contractor file imports (Android-specific, no-op on other platforms)
ContractorImportHandler(
pendingContractorImportUri = pendingContractorImportUri,