Skip to content

ResponsiveScaledBox in showDialog does not work properly #161

@ed-oo

Description

@ed-oo

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 ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions