Skip to content

Constrain Flutter version - #6

Open
markst wants to merge 2 commits into
arianneorpilla:mainfrom
markst:fix/device-pixel-ratio
Open

Constrain Flutter version#6
markst wants to merge 2 commits into
arianneorpilla:mainfrom
markst:fix/device-pixel-ratio

Conversation

@markst

@markst markst commented Mar 24, 2023

Copy link
Copy Markdown

Further to previous pull request: #5

Since the devicePixelRatio param was not added until:
flutter/flutter@fdc25a1

The package needs to be constrained to a Flutter version which includes this param.

@markst

markst commented Mar 24, 2023

Copy link
Copy Markdown
Author

An alternative is to wait until devicePixelRatio is included in the Flutter stable release?

@markst markst changed the title Constraint Flutter version Constrain Flutter version Mar 31, 2023
@AlwinFassbender

Copy link
Copy Markdown

Not 100% sure, but i think that change was made to Flutter 3.7.0. As that version was shipped with Dart 2.19.0, I think it is okay to leave the constraints as they are:

environment:
  sdk: '>=2.19.2 <3.0.0' 

I forked this repository, fixed the devicePixelRatio: metrics.devicePixelRatio, part for newer Flutter versions and uploaded the package to pub.dev, similar to other packages of bxqm that are not maintained anymore (example: https://pub.dev/packages/implicitly_animated_reorderable_list_2). I will try to maintain it when flutter version changes make it necessary. Check it out here: https://pub.dev/packages/material_floating_search_bar_2.

@AlwinFassbender

Copy link
Copy Markdown

I added a preview version 0.5.0 to the package, you can simply use that one from now on

@markst

markst commented Apr 21, 2023

Copy link
Copy Markdown
Author

Thanks @AlwinFassbender . though I can use it due to:

Because material_floating_search_bar_2 >=0.5.0 depends on meta ^1.9.1 and every version of flutter from sdk depends on meta 1.9.0, material_floating_search_bar_2 >=0.5.0 is incompatible with flutter from sdk.

@AlwinFassbender

Copy link
Copy Markdown

It works with this Flutter version:

Flutter 3.10.0-1.3.pre • channel beta • https://github.com/flutter/flutter.git
Framework • revision d11aff97d2 (2 days ago) • 2023-04-19 11:11:05 -0700
Engine • revision a645b36a9b
Tools • Dart 3.0.0 (build 3.0.0-417.2.beta) • DevTools 2.23.1

It doesn't seem to work with Flutter 3.9 or lower. Have you tried running flutter upgrade?

@nilesh-auz nilesh-auz left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM

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.

3 participants