Flutter_cached_network_image: cached_network_image is incompatible with flutter 2.xx

Created on 6 Mar 2021  路  8Comments  路  Source: Baseflow/flutter_cached_network_image

馃悰 Bug Report


It was working well till I upgraded the flutter to 2.0.1, I'm getting the below error

Because cached_network_image >=2.5.0 <3.0.0-nullsafety depends on flutter_cache_manager ^2.1.0 which depends on path_provider ^1.6.18, cached_network_image >=2.5.0 <3.0.0-nullsafety requires path_provider ^1.6.18.
So, because play depends on both cached_network_image ^2.5.0 and path_provider ^2.0.1, version solving failed.
pub get failed (1; So, because play depends on both cached_network_image ^2.5.0 and path_provider ^2.0.1, version solving failed.)

Note that I'm using the below related repo
provider: ^4.0.2
path_provider: ^2.0.1

Reproduction steps

Just add the repo to the pubspec.yaml and hit pub get

Configuration

Version: 2.5.0

Platform:

  • Android

Most helpful comment

Use pre-release version for now , works for me : )
cached_network_image: ^3.0.0-nullsafety

Doesnt work with the firebase libraries together

All 8 comments

same.

馃悰 Bug Report

It was working well till I upgraded the flutter to 2.0.1, I'm getting the below error

Because cached_network_image >=2.5.0 <3.0.0-nullsafety depends on flutter_cache_manager ^2.1.0 which depends on path_provider ^1.6.18, cached_network_image >=2.5.0 <3.0.0-nullsafety requires path_provider ^1.6.18.
So, because play depends on both cached_network_image ^2.5.0 and path_provider ^2.0.1, version solving failed.
pub get failed (1; So, because play depends on both cached_network_image ^2.5.0 and path_provider ^2.0.1, version solving failed.)

Note that I'm using the below related repo
provider: ^4.0.2
path_provider: ^2.0.1

Reproduction steps

Just add the repo to the pubspec.yaml and hit pub get

Configuration

Version: 2.5.0

Platform:

  • Android

flutter pub get
Because no versions of cached_network_image match >2.5.0 <3.0.0 and cached_network_image 2.5.0 depends on flutter_cache_manager ^2.1.0, cached_network_image ^2.5.0 requires flutter_cache_manager ^2.1.0.
And because flutter_cache_manager >=2.0.0-beta <3.0.0-nullsafety.0 depends on path_provider ^1.6.18, cached_network_image ^2.5.0 requires path_provider ^1.6.18.
So, because study depends on both cached_network_image ^2.5.0 and path_provider ^2.0.1, version solving failed.
Running "flutter pub get" in study...
pub get failed (1; So, because study depends on both cached_network_image ^2.5.0 and path_provider ^2.0.1, version solving failed.)

I followed your suggestion and put it in the warehouse, but it didn't work.

Use pre-release version for now , works for me : )
cached_network_image: ^3.0.0-nullsafety

Use pre-release version for now , works for me : )
cached_network_image: ^3.0.0-nullsafety

Doesnt work with the firebase libraries together

For a temporary compatibility with firebase, until the dependency is upgraded, see https://github.com/Baseflow/flutter_cached_network_image/issues/559#issuecomment-793116292
It seems to work that way for now :)

Use pre-release version for now , works for me : )
cached_network_image: ^3.0.0-nullsafety

Doesnt work with the firebase libraries together

For firebase, I'm using the following versions:

firebase: ^9.0.0
firebase_core: ^1.0.0
firebase_auth: ^1.0.0
firebase_storage: ^8.0.0
#firebase_analytics: ^7.1.0
firebase_messaging: ^9.0.0
#firebase_analytics_web: ^0.2.0
firebase_dynamic_links: ^0.8.0
firebase_core_platform_interface: ^4.0.0
cloud_firestore: ^1.0.0
google_maps_flutter: ^2.0.1

All of the are working well, unless the analitics and web

Hello, I'm using version 3.0.0-nullsafety and I'm getting this error when I try dart-migrate.

Before migrating your package, we recommend ensuring that every library it
imports (either directly or indirectly) has been migrated to null safety, so
that you will be able to run your unit tests in sound null checking mode.  You
are currently importing the following non-null-safe libraries:

  package:cached_network_image/cached_network_image.dart
  package:cached_network_image/src/cached_image_widget.dart
  package:cached_network_image/src/image_provider/_image_provider_io.dart
  package:cached_network_image/src/image_provider/cached_network_image_provider.dart
  package:cached_network_image/src/image_provider/multi_image_stream_completer.dart

Hello, I'm using version 3.0.0-nullsafety and I'm getting this error when I try dart-migrate.

Before migrating your package, we recommend ensuring that every library it
imports (either directly or indirectly) has been migrated to null safety, so
that you will be able to run your unit tests in sound null checking mode.  You
are currently importing the following non-null-safe libraries:

  package:cached_network_image/cached_network_image.dart
  package:cached_network_image/src/cached_image_widget.dart
  package:cached_network_image/src/image_provider/_image_provider_io.dart
  package:cached_network_image/src/image_provider/cached_network_image_provider.dart
  package:cached_network_image/src/image_provider/multi_image_stream_completer.dart

I think this is due to this issue: #463, pub.dev also doesn't indicate null-safety.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nashfive picture nashfive  路  5Comments

port3000 picture port3000  路  5Comments

digitaldangal picture digitaldangal  路  5Comments

ivk1800 picture ivk1800  路  7Comments

srburton picture srburton  路  6Comments