mirror of
https://github.com/flutter/samples.git
synced 2025-11-08 13:58:47 +00:00
Reverts the default animation behavior to be based on the platform, (#896)
not the kIsWeb flag: https://github.com/flutter/flutter/issues/82053
This commit is contained in:
@@ -64,6 +64,19 @@ class _BookstoreState extends State<Bookstore> {
|
||||
child: MaterialApp.router(
|
||||
routerDelegate: _routerDelegate,
|
||||
routeInformationParser: _routeParser,
|
||||
// Revert back to pre-Flutter-2.5 transition behavior:
|
||||
// https://github.com/flutter/flutter/issues/82053
|
||||
theme: ThemeData(
|
||||
pageTransitionsTheme: const PageTransitionsTheme(
|
||||
builders: <TargetPlatform, PageTransitionsBuilder>{
|
||||
TargetPlatform.android: FadeUpwardsPageTransitionsBuilder(),
|
||||
TargetPlatform.iOS: CupertinoPageTransitionsBuilder(),
|
||||
TargetPlatform.linux: FadeUpwardsPageTransitionsBuilder(),
|
||||
TargetPlatform.macOS: CupertinoPageTransitionsBuilder(),
|
||||
TargetPlatform.windows: FadeUpwardsPageTransitionsBuilder(),
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user