Codelessly / ResponsiveFramework

Easily make Flutter apps responsive. Automatically adapt UI to different screen sizes. Responsiveness made simple. Demo: https://gallery.codelessly.com/flutterwebsites/minimal/
https://codelessly.com
MIT License
1.25k stars 150 forks source link

responsive_utils.dart not included as an export in responsive_framework.dart #181

Closed mstainer14 closed 5 days ago

mstainer14 commented 2 months ago

When developing for web, the breakpointsLandscape property of ResponsiveBreakpoints.builder does not work as intended because the default value of _landscapePlatforms in responsive_breakpoints.dart is set to the following:

  static const List<ResponsiveTargetPlatform> _landscapePlatforms = [
    ResponsiveTargetPlatform.iOS,
    ResponsiveTargetPlatform.android,
    ResponsiveTargetPlatform.fuchsia,
  ];

In order to overcome this we need to set the landscapePlatforms property of ResponsiveBreakpoints.builder. However, because responsive_utils.dart is not included as an export in the barrel file, we cannot access the ResponsiveTargetPlatform class directly but have to manually import the file import 'package:responsive_framework/src/utils/responsive_utils.dart'; which gives us the following error.

Import of a library in the 'lib/src' directory of another package.
Try importing a public library that exports this library, or removing the import.dart[implementation_imports](https://dart.dev/lints/implementation_imports)

library package:responsive_framework/src/utils/responsive_utils.dart

Is it possible to add the responsive_utils.dart to the export file or move to a new location that is accessible through the import?

Many thanks

mstainer14 commented 2 months ago

@rayliverified

rayliverified commented 2 months ago

Let's add it ASAP.

That's a serious issue. Can you open a PR and I'll add you as a contributor too.

On Fri, 21 Jun 2024, 12:18 am Mike Stainer, @.***> wrote:

@rayliverified https://github.com/rayliverified

— Reply to this email directly, view it on GitHub https://github.com/Codelessly/ResponsiveFramework/issues/181#issuecomment-2182017435, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEXZO3QB6W7E4BVMHEOQ4KTZIOZQXAVCNFSM6AAAAABJVFYBVWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOBSGAYTONBTGU . You are receiving this because you were mentioned.Message ID: @.***>

mstainer14 commented 2 months ago

https://github.com/Codelessly/ResponsiveFramework/pull/182

Juliotati commented 2 months ago

@rayliverified Any prevision on when this gets published? I noticed there is no version bump on the PR 👀 (and it’s not linked to this issue either) Screenshot 2024-06-23 at 00 51 21

rayliverified commented 2 months ago

Not yet. I need to bundle some other changes for publishing.

rayliverified commented 5 days ago

Thanks for catching this and the PR.

Merged and released in v1.5.0.