diff --git a/lib/config/themes.dart b/lib/config/themes.dart index c1eed89d..86aa109a 100644 --- a/lib/config/themes.dart +++ b/lib/config/themes.dart @@ -41,6 +41,16 @@ abstract class FluffyThemes { snackBarTheme: SnackBarThemeData( behavior: kIsWeb ? SnackBarBehavior.floating : SnackBarBehavior.fixed, ), + pageTransitionsTheme: PageTransitionsTheme( + builders: { + TargetPlatform.fuchsia: ZoomPageTransitionsBuilder(), + TargetPlatform.android: ZoomPageTransitionsBuilder(), + TargetPlatform.linux: CupertinoPageTransitionsBuilder(), + TargetPlatform.macOS: CupertinoPageTransitionsBuilder(), + TargetPlatform.windows: CupertinoPageTransitionsBuilder(), + TargetPlatform.iOS: CupertinoPageTransitionsBuilder(), + }, + ), dialogTheme: DialogTheme( shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(AppConfig.borderRadius), @@ -126,6 +136,16 @@ abstract class FluffyThemes { ), clipBehavior: Clip.hardEdge, ), + pageTransitionsTheme: PageTransitionsTheme( + builders: { + TargetPlatform.fuchsia: ZoomPageTransitionsBuilder(), + TargetPlatform.android: ZoomPageTransitionsBuilder(), + TargetPlatform.linux: CupertinoPageTransitionsBuilder(), + TargetPlatform.macOS: CupertinoPageTransitionsBuilder(), + TargetPlatform.windows: CupertinoPageTransitionsBuilder(), + TargetPlatform.iOS: CupertinoPageTransitionsBuilder(), + }, + ), floatingActionButtonTheme: FloatingActionButtonThemeData( backgroundColor: AppConfig.primaryColor, foregroundColor: Colors.white, diff --git a/lib/main.dart b/lib/main.dart index 81d11f1b..a3a28dba 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -95,7 +95,7 @@ class FluffyChatApp extends StatelessWidget { '/search', '/contacts', }.contains(settings.name) - ? CupertinoPageRoute(builder: builder) + ? MaterialPageRoute(builder: builder) : FadeRoute(page: builder(context)), ), ),