jonataslaw / get_storage

A fast, extra light and synchronous key-value storage to Get framework
MIT License
359 stars 82 forks source link

I get error pub get after upgrade get 5x-beta #91

Open finzaiko opened 2 years ago

finzaiko commented 2 years ago

get: ^5.0.0-beta.30 get_storage: ^2.0.3

Running "flutter pub get" in flutter_starter_nav2...
Because get_storage 2.0.3 depends on get ^4.0.0 and no versions of get_storage match >2.0.3 <3.0.0, get_storage ^2.0.3 requires get ^4.0.0. So, because flutter_starter_nav2 depends on both get ^5.0.0-beta.30 and get_storage ^2.0.3, version solving failed. pub get failed (1; So, because flutter_starter_nav2 depends on both get ^5.0.0-beta.30 and get_storage ^2.0.3, version solving failed.) exit code 1

Flutter version: 2.10.0 Dart: 2.13.4

prolongservices commented 2 years ago

add this code in pubspec.yaml file

dependency_overrides: get: ^5.0.0-beta.30

finzaiko commented 2 years ago

Thanks @prolongservices

Its working and got warning

[example_nav2] flutter pub get
Running "flutter pub get" in example_nav2...                    
Warning: You are using these overridden dependencies:
! get 5.0.0-beta.30
Running "flutter pub get" in example_nav2...                        3.0s
exit code 0

also got another error when running

../../../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/get_storage-2.0.3/lib/src/storage/html.dart:19:13: Warning: Operand of null-aware operation '!' has type 'Map<String,
dynamic>' which excludes null.
 - 'Map' is from 'dart:core'.
    subject.value!.clear();
            ^
jasonlaw commented 2 years ago

encountered the same error here.

yutae commented 2 years ago

This is a temporary workaround. 😃

  get_storage:
    git:
      url: https://github.com/yutae/get_storage
      ref: master