Describe the bug
When using GetMaterialApp, the previous (outgoing) page freezes/stops animating during a route transition. The incoming page slides in correctly, but the outgoing page should have a subtle animation (e.g., scale-down with ZoomPageTransitionsBuilder) — instead it remains completely static.
Replacing GetMaterialApp with Flutter's MaterialApp resolves the issue and the outgoing page animates correctly.
Regression / Version-specific behavior
The scope of the issue differs across GetX versions:
| Version |
Get.to() |
Navigator.push |
| 4.7.3 |
❌ Buggy |
✅ Works |
| 5.0.0-release-candidate-9.3.2 |
❌ Buggy |
❌ Buggy |
master (7bfcd9c3) |
❌ Buggy |
❌ Buggy (same as 5.0.0-rc) |
- On 4.7.3, the bug only manifests when using
Get.to(). Using Flutter's native Navigator.push with MaterialPageRoute works correctly.
- Starting from 5.0.0-release-candidate-9.3.2, the bug applies to both
Get.to() and Navigator.push, meaning the issue has regressed further.
To Reproduce
Steps to reproduce the behavior:
- Create a new Flutter project.
- Add
get as a dependency.
- Replace
MaterialApp with GetMaterialApp in main.dart.
- Set
timeDilation = 5.0 to make the animation slow enough to observe.
- Configure
ZoomPageTransitionsBuilder as the page transition builder.
- Use
Navigator.push(context, MaterialPageRoute(builder: (context) => const NewPage())) to navigate to a new page.
- Observe that the previous page does not animate — it stays frozen while only the new page slides in.
Reproduction code
import 'package:flutter/material.dart';
import 'package:flutter/scheduler.dart';
import 'package:get/get.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
timeDilation = 5.0; // Slow down animations to observe the issue
return GetMaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
pageTransitionsTheme: const PageTransitionsTheme(
builders: <TargetPlatform, PageTransitionsBuilder>{
TargetPlatform.android: ZoomPageTransitionsBuilder(),
},
),
),
home: const MyHomePage(title: 'Flutter Demo Home Page'),
);
}
}
class MyHomePage extends StatefulWidget {
const MyHomePage({super.key, required this.title});
final String title;
@override
State<MyHomePage> createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
backgroundColor: Theme.of(context).colorScheme.inversePrimary,
title: Text(widget.title),
),
body: Center(
child: TextButton(
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(builder: (context) => const NewPage()),
);
},
child: const Text("Go to new page"),
),
),
);
}
}
class NewPage extends StatelessWidget {
const NewPage({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: const Text("New page")),
body: Center(
child: TextButton(
onPressed: () {
Navigator.pop(context);
},
child: const Text("Go back"),
),
),
);
}
}
Expected behavior
When Navigator.push is called, the previous (outgoing) page should have a transition animation (e.g., scale-down when using ZoomPageTransitionsBuilder), just as it does when using Flutter's plain MaterialApp. Both pages should animate simultaneously during the route transition.
Actual behavior
The previous page freezes immediately when the route transition begins and remains completely static until the transition completes. Only the incoming page animates.
Additional context
- This issue occurs because
GetMaterialApp wraps the Navigator in a way that interferes with the route transition's "secondary" animation (the animation driving the outgoing page).
- The bug is reproducible on both Android and iOS.
- Using
Navigator.push directly is a valid use case — users should not be forced to use Get.to() for correct route transitions.
Flutter Version:
3.41.7
Getx Version:
4.7.3, 5.0.0-release-candidate-9.3.2, master(7bfcd9)
Describe the bug
When using
GetMaterialApp, the previous (outgoing) page freezes/stops animating during a route transition. The incoming page slides in correctly, but the outgoing page should have a subtle animation (e.g., scale-down withZoomPageTransitionsBuilder) — instead it remains completely static.Replacing
GetMaterialAppwith Flutter'sMaterialAppresolves the issue and the outgoing page animates correctly.Regression / Version-specific behavior
The scope of the issue differs across GetX versions:
Get.to()Navigator.push7bfcd9c3)Get.to(). Using Flutter's nativeNavigator.pushwithMaterialPageRouteworks correctly.Get.to()andNavigator.push, meaning the issue has regressed further.To Reproduce
Steps to reproduce the behavior:
getas a dependency.MaterialAppwithGetMaterialAppinmain.dart.timeDilation = 5.0to make the animation slow enough to observe.ZoomPageTransitionsBuilderas the page transition builder.Navigator.push(context, MaterialPageRoute(builder: (context) => const NewPage()))to navigate to a new page.Reproduction code
Expected behavior
When
Navigator.pushis called, the previous (outgoing) page should have a transition animation (e.g., scale-down when usingZoomPageTransitionsBuilder), just as it does when using Flutter's plainMaterialApp. Both pages should animate simultaneously during the route transition.Actual behavior
The previous page freezes immediately when the route transition begins and remains completely static until the transition completes. Only the incoming page animates.
Additional context
GetMaterialAppwraps the Navigator in a way that interferes with the route transition's "secondary" animation (the animation driving the outgoing page).Navigator.pushdirectly is a valid use case — users should not be forced to useGet.to()for correct route transitions.Flutter Version:
3.41.7
Getx Version:
4.7.3, 5.0.0-release-candidate-9.3.2, master(7bfcd9)