Skip to content

[shared_preferences] [url_launcher] pub outdated fails with "Package not available" error #128195

@12people

Description

@12people

Is there an existing issue for this?

Steps to reproduce

  1. Add "shared_preferences" and/or "url_launcher" to pubspec.
  2. Make sure Linux is added to the project as a platform.
  3. Run flutter pub outdated.

(Just to note: I'm running into this error on my M1 Macbook.)

Expected results

The standard output of flutter pub outdated is returned — a table listing the current versions of libraries used in the project and the potential versions one could update to.

Actual results

When using shared_preferences in my project (directly or indirectly), I get this message:
Package not available (the pubspec for shared_preferences_linux 2.2.0 has version 0.0.0).

When using url_launcher in my project (directly or indirectly), I get this message:
Package not available (the pubspec for url_launcher_linux 3.0.5 has version 0.0.0).

Other packages work just fine for me (but of course I only use a small subset of the packages available out there).

Code sample

Code sample

Example of the pubspec.yaml file:

name: example
version: 1.0.0+1

environment:
  sdk: '>=2.12.0 <3.0.0'

dependencies:
  flutter:
    sdk: flutter
  url_launcher: ^6.0.20

Screenshots or Video

No response

Logs

No response

Flutter Doctor output

Doctor output
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.10.1, on macOS 13.4 22F66 darwin-arm64, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 14.3)
[✓] Chrome - develop for the web
[!] Android Studio (not installed)
[✓] Connected device (2 available)
[✓] Network resources

! Doctor found issues in 1 category.

Metadata

Metadata

Assignees

No one assigned

    Labels

    r: solvedIssue is closed as solved

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions