2
votes

While trying to work with STOMP, websockets, facing issue for "packages get" after updating pubspec with required stomp/websocket details. I have tried for stomp, stompdart, websocket none of them worked. Error observed while running "packages get" is "The current Dart SDK version is 2.1.0-dev.4.0.flutter-4eb879133a.

Because project_name depends on stompdart >=0.0.2 which requires SDK version >=1.5.0 <2.0.0, version solving failed. pub upgrade failed (1)"

If I try to downgrade flutter version then it has thrown exception informing 'current project needs SDK version > 2.0.0

Please help to clear the issue or suggest some other way as I am using STOMP at server end.

2

2 Answers

1
votes

had the same issue, it can be solved in two ways:

  1. solved it by adding this to my yaml file :

    dependency_overrides: stomp: ^0.7.3

    dependencies:

    stomp: ^0.7.3

    flutter: sdk: flutter

using the dependency_overrides works.

Secondly by running "pub upgrade" in your project directory

https://github.com/rikulo/stomp/issues/18#issuecomment-435748215

1
votes

Well, this is not a definitive answer, but it may help you. I forked a chinese library that seems to work named JStomp and did some translations. Let me know if it work since I am also interested to be able to work with STOMP on Flutter. Here's my fork: https://github.com/raedcran/flutter_jstomp