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

ResponsiveScaledBox in showDialog does not work properly #161

Open
ed-oo opened this issue Oct 27, 2023 · 0 comments
Open

ResponsiveScaledBox in showDialog does not work properly #161

ed-oo opened this issue Oct 27, 2023 · 0 comments

Comments

@ed-oo
Copy link

ed-oo commented Oct 27, 2023

Hello,

Very great job, this fix the draggable pointer problem, but i have a bug inside showDialog.

For this to work inside showDialog, ResponsiveScaledBox must be implemented like this:

showDialog(
    context: context,
    builder: (BuildContext context) => Listener(
      behavior: HitTestBehavior.translucent,
      child: ResponsiveScaledBox(
        width: ResponsiveValue<double>(context, conditionalValues: [
          Condition.between(start: 0, end: 2000, value: 1600),
        ]).value,
        child: child!,
      ),
    ),
    useSafeArea: true,
  );

The problem is that using MediaQuery.of(context).size doesn't give the right value with useSafeArea: true:
I'm on an iPad Pro 11 inch 4th gen (without home button), the value given by "MediaQuery.of(context).size.height" inside "showDialog" is 834.0, if i use useSafeArea: false the "MediaQuery.of(context).size.height" is 1117.5879.

Can you fix this problem plz ?

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

1 participant