Closed suprimpoudel closed 4 months ago
Hi @suprimpoudel 👋 Thanks for opening an issue!
Can you please share a minimal pubspec.yaml
that reproduces the issue? I'm happy to take a closer look.
Hi @felangel ,
Here is the pubspec.yaml
for my project
environment:
sdk: '>=3.4.3 <4.0.0'
dependencies:
flutter:
sdk: flutter
flutter_localizations:
sdk: flutter
carousel_slider: ^4.2.1
connectivity_plus: ^6.0.3
convert: ^3.1.1
cupertino_icons: ^1.0.8
crypto: ^3.0.3
decimal: ^3.0.2
device_info_plus: ^10.1.0
dio: ^5.5.0+1
esc_pos_utils_plus: ^2.0.3
equatable: ^2.0.5
excel: ^4.0.3
file_picker: ^8.0.6
firebase_analytics: ^11.2.0
firebase_core: ^3.2.0
firebase_crashlytics: ^4.0.3
firebase_messaging: ^15.0.3
fl_chart: ^0.68.0
flutter_barcode_listener: ^0.1.4
flutter_bloc: ^8.1.6
flutter_keyboard_visibility: ^6.0.0
flutter_local_notifications: ^17.2.1+2
flutter_native_splash: ^2.4.1
flutter_secure_storage: ^9.2.2
flutter_speed_dial: ^7.0.0
flutter_slidable: ^3.1.1
flutter_svg: ^2.0.10+1
flutter_typeahead: ^5.2.0
get_it: ^7.7.0
image_picker: ^1.1.2
in_app_update: ^4.2.3
intl: ^0.19.0
local_auth: ^2.2.0
mobile_scanner: ^5.1.1
nepali_date_picker: ^6.0.1
open_filex: ^4.4.0
path_provider: ^2.1.3
pdf: ^3.11.0
permission_handler: ^11.3.1
pinput: ^5.0.0
qr_flutter: ^4.1.0
shared_preferences: ^2.2.3
step_progress_indicator: ^1.0.2
sqflite: ^2.3.3+1
super_tooltip: ^2.0.8
url_launcher: ^6.3.0
# TODO: Update the dependency to latest version once bloc_test's test dependency updates
# The package bloc_test test dependency and web_socket_channel test
# dependency conflicts because of version, so cannot update the dependency to the latest one as of July 17, 2024
web_socket_channel: ^2.4.5
dev_dependencies:
integration_test:
sdk: flutter
flutter_test:
sdk: flutter
bloc_test: ^9.1.7
build_runner: ^2.4.11
flutter_lints: ^4.0.0
http_mock_adapter: ^0.6.1
mockito: ^5.4.4
sqflite_common_ffi: ^2.3.3
flutter:
generate: true
uses-material-design: true
assets:
- asset/images/
Here I cant update my web_socket_channel
dependency because of it conflict with bloc_test
package
Thanks I'll take a closer look shortly, apologies for the delay!
@suprimpoudel just took a look and this isn't a problem in bloc_test
. The package:test
version constraint in bloc allows the latest version of package:test
.
You can see this via the following pubspec.yaml
:
name: example
description: "A new Flutter project."
publish_to: 'none'
version: 0.1.0
environment:
sdk: '>=3.4.4 <4.0.0'
dependencies:
flutter:
sdk: flutter
web_socket_channel: ^3.0.0
dev_dependencies:
test: ^1.25.8
flutter_test:
sdk: flutter
flutter:
uses-material-design: true
Running flutter packages get
results in:
✖ flutter packages get
Resolving dependencies...
Note: test_api is pinned to version 0.7.0 by flutter_test from the flutter SDK.
See https://dart.dev/go/sdk-version-pinning for details.
Because every version of flutter_test from sdk depends on test_api 0.7.0 and test >=1.25.8 depends on test_api 0.7.3, flutter_test from sdk is
incompatible with test >=1.25.8.
So, because example depends on both test ^1.25.8 and flutter_test from sdk, version solving failed.
You can try the following suggestion to make the pubspec resolve:
* Try updating the following constraints: flutter pub add flutter:'{"version":"^0.0.0","sdk":"flutter"}' dev:flutter_test:'{"version":"^0.0.0","sdk":"flutter"}' dev:test:^1.25.2 web_socket_channel:^2.4.5
The problem is you need to upgrade you web_socket_channel
dependency to ^3.0.0
and use the master channel of Flutter (since this requires test_api: 0.7.3).
Eventually the changes in master will make it to stable and you should be able to upgrade to web_socket_channel
^3.0.0 on the stable channel as well.
Because the test dependency for the bloc_test package is outdated, it is affecting some of my dependencies, preventing me from upgrading them to the latest versions.
Here is the error message caused by bloc_test, indicating a conflict with the latest version of the web_socket_channel package: