Skip to content

fix: remove all Flutter dependencies from better_networking package#1374

Open
AshutoshSharma-pixel wants to merge 1 commit intofoss42:mainfrom
AshutoshSharma-pixel:fix/remove-flutter-deps-better-networking
Open

fix: remove all Flutter dependencies from better_networking package#1374
AshutoshSharma-pixel wants to merge 1 commit intofoss42:mainfrom
AshutoshSharma-pixel:fix/remove-flutter-deps-better-networking

Conversation

@AshutoshSharma-pixel
Copy link

Removes Flutter-specific dependencies to make better_networking usable in pure Dart CLI context:

  • platform_utils.dart: replaced kIsWeb with false, removed flutter/foundation import
  • http_client_manager.dart: removed kIsWeb checks, removed flutter/foundation import
  • oauth2_utils.dart: removed flutter_web_auth_2, replaced mobile OAuth with UnsupportedError
  • handle_auth.dart: removed flutter/foundation import, replaced debugPrint with stderr.writeln
  • pubspec.yaml: removed flutter SDK, flutter_web_auth_2, flutter_test, flutter_lints

Fixes #1360

PR Description

Removes all Flutter-specific dependencies from better_networking package
to make it usable in pure Dart CLI context. This is a complete fix following
mentor feedback on PR #1361.

Mobile OAuth (flutter_web_auth_2) replaced with UnsupportedError since
CLI context only supports desktop platforms.

Related Issues

Closes #1360

Checklist

  • I have gone through the contributing guide
  • I have updated my branch and synced it with project main branch before making this PR
  • I am using the latest Flutter stable branch (run flutter upgrade and verify)
  • I have run the tests (flutter test) and all tests are passing

Added/updated tests?

  • Yes
  • No, and this is why: Bug fix removing Flutter dependencies. No behavioral change on desktop
    platforms. 3 pre-existing info hints only, no errors from Dart analyze.

OS on which you have developed and tested the feature?

  • Windows
  • macOS
  • Linux

Removes Flutter-specific dependencies to make better_networking usable
in pure Dart CLI context:

- platform_utils.dart: replaced kIsWeb with false, removed flutter/foundation import
- http_client_manager.dart: removed kIsWeb checks, removed flutter/foundation import
- oauth2_utils.dart: removed flutter_web_auth_2, replaced mobile OAuth with UnsupportedError
- handle_auth.dart: removed flutter/foundation import, replaced debugPrint with stderr.writeln
- pubspec.yaml: removed flutter SDK, flutter_web_auth_2, flutter_test, flutter_lints

Fixes foss42#1360
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: better_networking package has Flutter-specific dependencies blocking pure Dart CLI usage

1 participant