Skip to content

Tony/240 screen width threshold#242

Open
tonypioneer wants to merge 2 commits intodevfrom
tony/240_screen_width_threshold
Open

Tony/240 screen width threshold#242
tonypioneer wants to merge 2 commits intodevfrom
tony/240_screen_width_threshold

Conversation

@tonypioneer
Copy link
Collaborator

Pull Request Details

What issue does this PR address

  • Added isMedScreen, isWideScreen, and isVeryWideScreen methods.

Associated Issue

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Build and run the app.

Checklist

Complete the check-list below to ensure your branch is ready for PR.

  • Screenshots included in linked issue #
  • Changes adhere to the style and coding guidelines
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • Any dependent changes have been merged and published in downstream modules
  • The update contains no confidential information
  • The update has no duplicated content
  • No lint check errors are related to these changes (make prep or flutter analyze lib)
  • Integration test dart test output or screenshot included in issue #
  • I tested the PR on these devices:
    • Android
    • iOS
    • Linux
    • MacOS
    • Windows
    • Web
  • I have identified reviewers
  • The PR has been approved by reviewers

Finalising

Once PR discussion is complete and reviewers have approved:

  • Merge dev into the this branch
  • Resolve any conflicts
  • Add a one line summary into the CHANGELOG.md
  • Push to the git repository and review
  • Merge the PR into dev

@tonypioneer tonypioneer requested a review from jesscmoore March 16, 2026 22:33
@tonypioneer tonypioneer linked an issue Mar 16, 2026 that may be closed by this pull request
3 tasks
@tonypioneer
Copy link
Collaborator Author

The locmax issue has been fixed in PR #244.

Copy link
Collaborator

@jesscmoore jesscmoore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HI @tonypioneer Thanks for actioning so quickly. Looks good. Can you make these SolidScaffoldHelpers.isXScreen methods exported?
Also, the SolidScaffoldHelpers now looks to replace WindowSize class. Please remove the duplication. This will now be a breaking change, as some apps use WindowSize.

@tonypioneer
Copy link
Collaborator Author

HI @tonypioneer Thanks for actioning so quickly. Looks good. Can you make these SolidScaffoldHelpers.isXScreen methods exported? Also, the SolidScaffoldHelpers now looks to replace WindowSize class. Please remove the duplication. This will now be a breaking change, as some apps use WindowSize.

Hi @jesscmoore, the SolidScaffoldHelpers.isXScreen methods have been exported.

I’ve reviewed both SolidScaffoldHelpers and WindowSize, but I couldn’t find a clear duplication in the current implementation. They seem to overlap conceptually, but the structure and usage are still a bit different. Would you mind pointing me to the specific parts where you see duplication? That would really help me align the changes properly and avoid removing anything that’s still in use.

@tonypioneer tonypioneer requested a review from jesscmoore March 17, 2026 00:34
Copy link
Collaborator

@jesscmoore jesscmoore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @tonypioneer,
I've reviewed optimisation advice as well.

  • MediaQuery.of - is generally not advisable for performance reasons as it will trigger a full rebuild of everything affected when any MediaQuery property changes. MediaQuery.sizeOf() is better as will only rerun if screen size changes.

  • Using LayoutBuilder constraints, such as in WindowSize() is usually what one actually wants for responsive design, as it returns the size of the available layout, and only changes if the parent widget changes and is thought to have higher performance. I would suggest adapting the SolidScaffoldHelpers to use LayoutBuilder.

  • WindowSize.isNarrowWindow() is an example using constraints from LayoutBuilder.

  • We would be better to just have one type of method for wide measurement, or clarify the difference if there is uses for both. For notepod, communitypod usecases the need is to measure the layout width not the screen width.

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

Successfully merging this pull request may close these issues.

SOLIDUI: add isMedScreen, isWideScreen, and isVeryWideScreen methods

2 participants