Skip to content

Commit

Permalink
Default to cupertino page transitions (#175)
Browse files Browse the repository at this point in the history
  • Loading branch information
Feichtmeier committed May 14, 2022
1 parent 0ab272b commit 7d8a103
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/src/themes/common_themes.dart
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,12 @@ RadioThemeData _getRadioThemeData(Color primaryColor, Brightness brightness) {
(states) => _getCheckFillColor(states, primaryColor, brightness)));
}

const _pageTransitionTheme = PageTransitionsTheme(
builders: {
TargetPlatform.linux: CupertinoPageTransitionsBuilder(),
},
);

/// Helper function to create a new Yaru light theme
ThemeData createYaruLightTheme({
required ColorScheme colorScheme,
Expand All @@ -223,6 +229,7 @@ ThemeData createYaruLightTheme({
bool? useMaterial3 = false,
}) {
return ThemeData(
pageTransitionsTheme: _pageTransitionTheme,
useMaterial3: useMaterial3,
tabBarTheme: TabBarTheme(labelColor: colorScheme.onSurface),
dialogTheme: _dialogThemeLight,
Expand Down Expand Up @@ -270,6 +277,7 @@ ThemeData createYaruDarkTheme({
bool? useMaterial3 = false,
}) {
return ThemeData(
pageTransitionsTheme: _pageTransitionTheme,
useMaterial3: useMaterial3,
tabBarTheme: TabBarTheme(labelColor: Colors.white.withOpacity(0.8)),
dialogTheme: _dialogThemeDark,
Expand Down

0 comments on commit 7d8a103

Please sign in to comment.