mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-11-18 01:49:50 +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(
|
snackBarTheme: SnackBarThemeData(
|
||||||
behavior: kIsWeb ? SnackBarBehavior.floating : SnackBarBehavior.fixed,
|
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(
|
dialogTheme: DialogTheme(
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
borderRadius: BorderRadius.circular(AppConfig.borderRadius),
|
borderRadius: BorderRadius.circular(AppConfig.borderRadius),
|
||||||
@ -126,6 +136,16 @@ abstract class FluffyThemes {
|
|||||||
),
|
),
|
||||||
clipBehavior: Clip.hardEdge,
|
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(
|
floatingActionButtonTheme: FloatingActionButtonThemeData(
|
||||||
backgroundColor: AppConfig.primaryColor,
|
backgroundColor: AppConfig.primaryColor,
|
||||||
foregroundColor: Colors.white,
|
foregroundColor: Colors.white,
|
||||||
|
@ -95,7 +95,7 @@ class FluffyChatApp extends StatelessWidget {
|
|||||||
'/search',
|
'/search',
|
||||||
'/contacts',
|
'/contacts',
|
||||||
}.contains(settings.name)
|
}.contains(settings.name)
|
||||||
? CupertinoPageRoute(builder: builder)
|
? MaterialPageRoute(builder: builder)
|
||||||
: FadeRoute(page: builder(context)),
|
: FadeRoute(page: builder(context)),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
Loading…
Reference in New Issue
Block a user