Skip to content

Fix SDK constraint mismatch in pubspec.yaml (DX: setup issue) #875

@Aman071106

Description

@Aman071106

Category

Developer Experience


Description

While setting up API Dash locally using the official contributing guide, dependency resolution fails with Flutter versions below 3.35.1 (Dart <3.8.0).

Currently, pubspec.yaml specifies:

environment:
  sdk: ">=3.0.0 <4.0.0"
  flutter: ">=3.29.0"

However, better_networking requires Dart ^3.8.0. This mismatch prevents new contributors from completing the setup.


Steps to Reproduce

  1. Follow the Run API Dash locally guide:

    # clone fork
    flutter create --platforms=<platform> .
    dart pub global activate melos
    melos bootstrap
    melos pub-get
  2. Ensure Flutter version is 3.29.0 (ships with Dart 3.7.2):

    flutter --version
  • If not then :
    flutter downgrade 3.29.0
  1. Run flutter pub get.

Error:

The current Dart SDK version is 3.7.2.

Because every version of apidash_core from path depends on better_networking from path which requires SDK version ^3.8.0, apidash_core from path is forbidden.
So, because apidash depends on apidash_core from path, version solving failed.
Erro

Expected Behavior

  • Setup guide should clearly mention Dart >=3.8.0.
  • Or SDK constraint in pubspec.yaml should be updated to >=3.8.0 <4.0.0.

Suggested Fix

Suggested Fix: Update the SDK constraint in pubspec.yaml to >=3.8.0 <4.0.0 so contributors see the requirement upfront.

This ensures contributors immediately see a clear SDK version requirement instead of a hidden dependency conflict.

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