Browse Source

neon: Cleanup manual theming now done by M3

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

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

@ -27,41 +27,17 @@ ThemeData getThemeFromNextcloudTheme(
secondary: keepOriginalAccentColorOverride,
);
final fillColor = MaterialStateProperty.resolveWith((final states) {
if (states.contains(MaterialState.disabled)) {
return brightness == Brightness.dark ? Colors.white38 : Colors.black38;
}
return colorScheme.primary;
});
return ThemeData(
useMaterial3: true,
colorScheme: colorScheme,
scaffoldBackgroundColor: colorScheme.background,
canvasColor: colorScheme.surface, // For Drawer
cardColor: colorScheme.background, // For LicensePage
snackBarTheme: const SnackBarThemeData(
behavior: SnackBarBehavior.floating,
),
checkboxTheme: CheckboxThemeData(
fillColor: fillColor,
checkColor: MaterialStateProperty.resolveWith((final states) => colorScheme.onPrimary),
),
dividerTheme: const DividerThemeData(
thickness: 1.5,
space: 30,
),
popupMenuTheme: PopupMenuThemeData(
// TODO: Only needed until M3 popup menus are implemented
color: brightness == Brightness.dark
? oledAsDark
? const Color(0xFF202020)
: const Color(0xFF404040)
: const Color(0xFFEAEAEA),
),
radioTheme: RadioThemeData(
fillColor: fillColor,
),
);
}

Loading…
Cancel
Save