mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
chore: bump dart sdk to 3.8 (#20355)
* chore: bump dart sdk to 3.8 * chore: make build * make pigeon * chore: format files --------- Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
This commit is contained in:
parent
9b3718120b
commit
e52b9d15b5
643 changed files with 32561 additions and 35292 deletions
|
|
@ -10,10 +10,7 @@ class ImmichTheme {
|
|||
const ImmichTheme({required this.light, required this.dark});
|
||||
}
|
||||
|
||||
ThemeData getThemeData({
|
||||
required ColorScheme colorScheme,
|
||||
required Locale locale,
|
||||
}) {
|
||||
ThemeData getThemeData({required ColorScheme colorScheme, required Locale locale}) {
|
||||
final isDark = colorScheme.brightness == Brightness.dark;
|
||||
|
||||
return ThemeData(
|
||||
|
|
@ -26,9 +23,7 @@ ThemeData getThemeData({
|
|||
scaffoldBackgroundColor: colorScheme.surface,
|
||||
splashColor: colorScheme.primary.withValues(alpha: 0.1),
|
||||
highlightColor: colorScheme.primary.withValues(alpha: 0.1),
|
||||
bottomSheetTheme: BottomSheetThemeData(
|
||||
backgroundColor: colorScheme.surfaceContainer,
|
||||
),
|
||||
bottomSheetTheme: BottomSheetThemeData(backgroundColor: colorScheme.surfaceContainer),
|
||||
fontFamily: _getFontFamilyFromLocale(locale),
|
||||
snackBarTheme: SnackBarThemeData(
|
||||
contentTextStyle: TextStyle(
|
||||
|
|
@ -52,30 +47,12 @@ ThemeData getThemeData({
|
|||
centerTitle: true,
|
||||
),
|
||||
textTheme: const TextTheme(
|
||||
displayLarge: TextStyle(
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
displayMedium: TextStyle(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
displaySmall: TextStyle(
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
titleSmall: TextStyle(
|
||||
fontSize: 16.0,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
titleMedium: TextStyle(
|
||||
fontSize: 18.0,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
titleLarge: TextStyle(
|
||||
fontSize: 26.0,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
displayLarge: TextStyle(fontSize: 18, fontWeight: FontWeight.w600),
|
||||
displayMedium: TextStyle(fontSize: 14, fontWeight: FontWeight.w600),
|
||||
displaySmall: TextStyle(fontSize: 12, fontWeight: FontWeight.w600),
|
||||
titleSmall: TextStyle(fontSize: 16.0, fontWeight: FontWeight.w600),
|
||||
titleMedium: TextStyle(fontSize: 18.0, fontWeight: FontWeight.w600),
|
||||
titleLarge: TextStyle(fontSize: 26.0, fontWeight: FontWeight.w600),
|
||||
),
|
||||
elevatedButtonTheme: ElevatedButtonThemeData(
|
||||
style: ElevatedButton.styleFrom(
|
||||
|
|
@ -83,81 +60,43 @@ ThemeData getThemeData({
|
|||
foregroundColor: isDark ? Colors.black87 : Colors.white,
|
||||
),
|
||||
),
|
||||
chipTheme: const ChipThemeData(
|
||||
side: BorderSide.none,
|
||||
),
|
||||
sliderTheme: const SliderThemeData(
|
||||
thumbShape: RoundSliderThumbShape(enabledThumbRadius: 7),
|
||||
trackHeight: 2.0,
|
||||
),
|
||||
bottomNavigationBarTheme: const BottomNavigationBarThemeData(
|
||||
type: BottomNavigationBarType.fixed,
|
||||
),
|
||||
chipTheme: const ChipThemeData(side: BorderSide.none),
|
||||
sliderTheme: const SliderThemeData(thumbShape: RoundSliderThumbShape(enabledThumbRadius: 7), trackHeight: 2.0),
|
||||
bottomNavigationBarTheme: const BottomNavigationBarThemeData(type: BottomNavigationBarType.fixed),
|
||||
popupMenuTheme: const PopupMenuThemeData(
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.all(Radius.circular(10)),
|
||||
),
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(10))),
|
||||
),
|
||||
navigationBarTheme: NavigationBarThemeData(
|
||||
backgroundColor: isDark ? colorScheme.surfaceContainer : colorScheme.surface,
|
||||
labelTextStyle: const WidgetStatePropertyAll(
|
||||
TextStyle(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
labelTextStyle: const WidgetStatePropertyAll(TextStyle(fontSize: 14, fontWeight: FontWeight.w500)),
|
||||
),
|
||||
inputDecorationTheme: InputDecorationTheme(
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: colorScheme.primary,
|
||||
),
|
||||
borderSide: BorderSide(color: colorScheme.primary),
|
||||
borderRadius: const BorderRadius.all(Radius.circular(15)),
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: colorScheme.outlineVariant,
|
||||
),
|
||||
borderSide: BorderSide(color: colorScheme.outlineVariant),
|
||||
borderRadius: const BorderRadius.all(Radius.circular(15)),
|
||||
),
|
||||
labelStyle: TextStyle(
|
||||
color: colorScheme.primary,
|
||||
),
|
||||
hintStyle: const TextStyle(
|
||||
fontSize: 14.0,
|
||||
fontWeight: FontWeight.normal,
|
||||
),
|
||||
),
|
||||
textSelectionTheme: TextSelectionThemeData(
|
||||
cursorColor: colorScheme.primary,
|
||||
labelStyle: TextStyle(color: colorScheme.primary),
|
||||
hintStyle: const TextStyle(fontSize: 14.0, fontWeight: FontWeight.normal),
|
||||
),
|
||||
textSelectionTheme: TextSelectionThemeData(cursorColor: colorScheme.primary),
|
||||
dropdownMenuTheme: DropdownMenuThemeData(
|
||||
menuStyle: const MenuStyle(
|
||||
shape: WidgetStatePropertyAll<OutlinedBorder>(
|
||||
RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.all(Radius.circular(15)),
|
||||
),
|
||||
RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(15))),
|
||||
),
|
||||
),
|
||||
inputDecorationTheme: InputDecorationTheme(
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: colorScheme.primary,
|
||||
),
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(borderSide: BorderSide(color: colorScheme.primary)),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: colorScheme.outlineVariant,
|
||||
),
|
||||
borderSide: BorderSide(color: colorScheme.outlineVariant),
|
||||
borderRadius: const BorderRadius.all(Radius.circular(15)),
|
||||
),
|
||||
labelStyle: TextStyle(
|
||||
color: colorScheme.primary,
|
||||
),
|
||||
hintStyle: const TextStyle(
|
||||
fontSize: 14.0,
|
||||
fontWeight: FontWeight.normal,
|
||||
),
|
||||
labelStyle: TextStyle(color: colorScheme.primary),
|
||||
hintStyle: const TextStyle(fontSize: 14.0, fontWeight: FontWeight.normal),
|
||||
),
|
||||
),
|
||||
dialogTheme: DialogThemeData(backgroundColor: colorScheme.surfaceContainer),
|
||||
|
|
@ -174,9 +113,7 @@ ThemeData getThemeData({
|
|||
// This method replaces all surface shades in ImmichTheme to a static ones
|
||||
// as we are creating the colorscheme through seedColor the default surfaces are
|
||||
// tinted with primary color
|
||||
ImmichTheme decolorizeSurfaces({
|
||||
required ImmichTheme theme,
|
||||
}) {
|
||||
ImmichTheme decolorizeSurfaces({required ImmichTheme theme}) {
|
||||
return ImmichTheme(
|
||||
light: theme.light.copyWith(
|
||||
surface: const Color(0xFFf9f9f9),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue