parse-community / Parse-SDK-Flutter

The Dart/Flutter SDK for Parse Platform
https://parseplatform.org
Apache License 2.0
575 stars 187 forks source link

connectivity_plus plugin latest versions are not supported (again) #1001

Open chadpav opened 1 month ago

chadpav commented 1 month ago

New Issue Checklist

Issue Description

Parse-SDK-Flutter depends on connectivity_plus ^5.0.2 but many packages are requiring a newer release that has breaking changes. Overriding the dependency doesn't work since connectivity_plus changed a method signature that this package depends on. I have multiple other packages requiring the latest connectivity_plus package so I'm stuck.

I'm working on a PR locally to resolve but wanted to check to see if someone else is already doing it. It appears that this package has caused similar issues before. See connectivity_plus closed issues

Related: https://github.com/parse-community/Parse-SDK-Flutter/issues/992

Steps to reproduce

1) Clone and open the Parse-SDK-Flutter project. 2) In the pubspec.yaml update the connectivity_plus dependency to ^6.0.3 3) run Dart pub get to update dependencies. 4) Try to build the project and/or run tests.

Actual Outcome

The project will not compile. See build errors & warnings related to the checkConnectivity() and connectivityStream methods.

Expected Outcome

Compiles and retains current connectivity check behavior.

Environment

Parse-SDK-Flutter 8.0.3 connectivity_plus 6.0.3

Parse Flutter SDK

Server

Logs

00:01 +0: loading /Users/.../workspace/Parse-SDK-Flutter/packages/flutter/test/parse_client_configuration_test.dart                                                                                 lib/parse_server_sdk_flutter.dart:126:53: Error: The argument type 'ParseConnectivityResult Function(ConnectivityResult)' can't be assigned to the parameter type 'ParseConnectivityResult
Function(List<ConnectivityResult>)'.
 - 'ParseConnectivityResult' is from 'package:parse_server_sdk/parse_server_sdk.dart' ('../../../../.pub-cache/hosted/pub.dev/parse_server_sdk-6.4.0/lib/parse_server_sdk.dart').
 - 'ConnectivityResult' is from 'package:connectivity_plus_platform_interface/src/enums.dart' ('../../../../.pub-cache/hosted/pub.dev/connectivity_plus_platform_interface-2.0.0/lib/src/enums.dart').
 - 'List' is from 'dart:core'.
    return Connectivity().onConnectivityChanged.map((ConnectivityResult event) {
parse-github-assistant[bot] commented 1 month ago

Thanks for opening this issue!

mtrezza commented 1 month ago

@mbfakourii what do you think?

chadpav commented 1 month ago

@mtrezza you guys are quick to respond. I just submitted PR #1002 for your review.

mbfakourii commented 1 month ago

@mbfakourii what do you think?

I will check