Browse Source

neon: Fix radio theme

pull/151/head
jld3103 2 years ago
parent
commit
bee053c499
No known key found for this signature in database
GPG Key ID: 9062417B9E8EB7B3
  1. 19
      packages/neon/lib/src/utils/theme.dart

19
packages/neon/lib/src/utils/theme.dart

@ -35,6 +35,14 @@ ThemeData getThemeFromNextcloudTheme(
secondary: keepOriginalAccentColorOverride,
);
final fillColor = MaterialStateProperty.resolveWith((final states) {
if (states.contains(MaterialState.disabled)) {
return selectBrightness == Brightness.dark ? Colors.white38 : Colors.black38;
}
return colorScheme.primary;
});
return ThemeData(
useMaterial3: true,
colorScheme: colorScheme,
@ -45,13 +53,7 @@ ThemeData getThemeFromNextcloudTheme(
behavior: SnackBarBehavior.floating,
),
checkboxTheme: CheckboxThemeData(
fillColor: MaterialStateProperty.resolveWith((final states) {
if (states.contains(MaterialState.disabled)) {
return selectBrightness == Brightness.dark ? Colors.white38 : Colors.black38;
}
return colorScheme.primary;
}),
fillColor: fillColor,
checkColor: MaterialStateProperty.resolveWith((final states) => colorScheme.onPrimary),
),
dividerTheme: const DividerThemeData(
@ -66,5 +68,8 @@ ThemeData getThemeFromNextcloudTheme(
: const Color(0xFF404040)
: const Color(0xFFEAEAEA),
),
radioTheme: RadioThemeData(
fillColor: fillColor,
),
);
}

Loading…
Cancel
Save