mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-12-18 02:42:34 +01:00
feat: Zoom page transition on Android and Fuchsia
This commit is contained in:
parent
3830b4bd6b
commit
e6c20ddd18
@ -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,
|
||||
|
@ -95,7 +95,7 @@ class FluffyChatApp extends StatelessWidget {
|
||||
'/search',
|
||||
'/contacts',
|
||||
}.contains(settings.name)
|
||||
? CupertinoPageRoute(builder: builder)
|
||||
? MaterialPageRoute(builder: builder)
|
||||
: FadeRoute(page: builder(context)),
|
||||
),
|
||||
),
|
||||
|
Loading…
Reference in New Issue
Block a user