Skip to content
New issue

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

Setting the PopScope's canPop to false is invalid #3216

Open
yoni1988 opened this issue Sep 20, 2024 · 4 comments
Open

Setting the PopScope's canPop to false is invalid #3216

yoni1988 opened this issue Sep 20, 2024 · 4 comments
Assignees

Comments

@yoni1988
Copy link

I just used the example_nav2 to test.

import 'package:flutter/material.dart';
import 'package:get/get.dart';

import '../controllers/product_details_controller.dart';

class ProductDetailsView extends GetWidget<ProductDetailsController> {
  const ProductDetailsView({super.key});

  @override
  Widget build(BuildContext context) {
    return PopScope(
      canPop: false,
      child: Scaffold(
        body: Center(
          child: Column(
            mainAxisSize: MainAxisSize.min,
            children: [
              const Text(
                'ProductDetailsView is working',
                style: TextStyle(fontSize: 20),
              ),
              Text('ProductId: ${controller.productId}')
            ],
          ),
        ),
      ),
    );
  }
}

Flutter Version:
3.24.3

Getx Version:
get: ^5.0.0-release-candidate-9.2

Describe on which device you found the bug:
Android emulator

untitled.webm
@ZhuJHua
Copy link

ZhuJHua commented Sep 20, 2024

same question

@IdrisQashan
Copy link

same problem

@inyong1
Copy link

inyong1 commented Sep 25, 2024

Tried in chrome browser
setting canpop to false worked if navigates back using back button on the appbar. But, still go back if clicking on browser's back button (R.C 9.2)

@norman93sun
Copy link

same question

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants