We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
class FlutterTest extends StatefulWidget { const FlutterTest({super.key}); @override State<FlutterTest> createState() => _FlutterTestState(); } class _FlutterTestState extends State<FlutterTest> { @override Widget build(BuildContext context) { return const GetMaterialApp(home: A()); } } class A extends StatelessWidget { const A({super.key}); @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar(), body: Center( child: TextButton( child: const Text('to B'), onPressed: () { Get.to(() => const B()); }, ), ), ); } } class B extends StatefulWidget { const B({super.key}); @override State<B> createState() => _BState(); } class _BState extends State<B> { @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar(), body: const PopScope( canPop: false, child: Text("B Page"), ), ); } }
If you use MaterialApp with Navigator.push, you can prevent going back.
The text was updated successfully, but these errors were encountered:
in get: ^5.0.0-release-candidate-9.2
Sorry, something went wrong.
in 5.0.0, canPop is always true !!!!
PopScope( canPop: false, onPopInvokedWithResult: (canPop, _) { debugPrint("CL => $canPop"); /// always true }, ...
jonataslaw
No branches or pull requests
If you use MaterialApp with Navigator.push, you can prevent going back.
The text was updated successfully, but these errors were encountered: