Skip to content

Doesn't set MediaQueryData.viewPadding #50

Open
@kerberjg

Description

@kerberjg

When using macos_window_utils in combination with other UI libraries like Material and Cupertino, the content tends to invade the button area, like this:

image

The simple solution would be to set the viewPadding property on MediaQuery, which is how Flutter compensates for notches on phones. Here's my temporary workaround:

if(defaultTargetPlatform == TargetPlatform.macOS) {
      return MediaQuery(
        child: app,
        data: MediaQuery.of(context).copyWith(
          padding: const EdgeInsets.only(top: 40),
        ),
      );
    }

Works as intended:

image

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