Skip to content

refactor: pure-Dart refactor of core packages #1637

Open
badnikhil wants to merge 1 commit into
foss42:mainfrom
badnikhil:packages_refactoring
Open

refactor: pure-Dart refactor of core packages #1637
badnikhil wants to merge 1 commit into
foss42:mainfrom
badnikhil:packages_refactoring

Conversation

@badnikhil
Copy link
Copy Markdown
Contributor

PR Description

This PR implements a significant architectural refactoring aimed at decoupling Internal logic from the Flutter SDK. This transition is a prerequisite for high-performance, standalone CLI execution.
Key Changes:

  • Refactored apidash_core, better_networking, and genai to be pure-Dart packages by removing all hard dependencies on the Flutter framework.
  • Introduced isThisWeb and localized platform detection utilities within the pure-Dart packages to replace kIsWeb from the Flutter foundation library.
  • Decoupled the OAuth2 flow by introducing a callback-based abstraction. The UI browser logic (flutter_web_auth_2) has been moved to the root application and is now injected into the networking engine at runtime via an OAuth2CallbackHandler.
  • Added logic to lib/services/oauth_services.dart to maintain full OAuth2 functionality in the GUI, while allowing the engine for terminal-based auth flows.

Related Issues

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: Not Required.

OS on which you have developed and tested the feature?

  • Windows
  • macOS
  • Linux

@badnikhil badnikhil changed the title refactor: pure-Dart refactor of core packages and implementation of Oauth2 refactor: pure-Dart refactor of core packages Apr 14, 2026
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]: genai package has unnecessary Flutter SDK dependency preventing pure-Dart CLI usage

1 participant