Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't set fixed Flutter version on pubspec.yaml #126576

Closed
2 tasks done
RodXander opened this issue May 11, 2023 · 2 comments
Closed
2 tasks done

Can't set fixed Flutter version on pubspec.yaml #126576

RodXander opened this issue May 11, 2023 · 2 comments

Comments

@RodXander
Copy link

Is there an existing issue for this?

Steps to reproduce

  1. In the pubspec.yaml of an empty project set the environment section to a specific version of Flutter, like so:
environment:
  flutter: 3.10.0
  1. In your pubspec.lock you'll see:
sdks:
  flutter: ">=3.10.0"

However, if you do the same with the sdk, it'll work as expected, meaning:

environment:
  sdk: 3.0.0

will yield

sdks:
  dart: "3.0.0"

Expected results

pub get

Should fail for versions of Flutter previous or later than the one set in the pubspec.yaml.

Actual results

pub get

Only fail for versions of Flutter previous to the one set. Later ones are not stopped.

Code sample

environment:
  flutter: 3.10.0

Screenshots or Video

Screenshots / Video demonstration

[Upload media here]

Logs

Logs
[Paste your logs here]

Flutter Doctor output

[✓] Flutter (Channel stable, 3.10.0, on macOS 13.2.1 22D68 darwin-arm64, locale en-CA)
    • Flutter version 3.10.0 on channel stable at /Users/rodxander/fvm/versions/3.10.0
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 84a1e904f4 (2 days ago), 2023-05-09 07:41:44 -0700
    • Engine revision d44b5a94c9
    • Dart version 3.0.0
    • DevTools version 2.23.1

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
    • Android SDK at /Users/rodxander/Library/Android/sdk
    • Platform android-33, build-tools 33.0.1
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14E222b
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2022.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301)

[✓] VS Code (version 1.77.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.62.0

[✓] Connected device (3 available)
    • sdk gphone64 arm64 (mobile) • emulator-5554 • android-arm64  • Android 13 (API 33) (emulator)
    • macOS (desktop)             • macos         • darwin-arm64   • macOS 13.2.1 22D68 darwin-arm64
    • Chrome (web)                • chrome        • web-javascript • Google Chrome 112.0.5615.137

[✓] Network resources
    • All expected network resources are available.

• No issues found!
@stuartmorgan
Copy link
Contributor

Duplicate of #95472

@stuartmorgan stuartmorgan marked this as a duplicate of #95472 May 11, 2023
@stuartmorgan stuartmorgan closed this as not planned Won't fix, can't repro, duplicate, stale May 11, 2023
@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants