Skip to content

Conversation

@terrier989
Copy link
Member

No description provided.

Copilot AI review requested due to automatic review settings November 21, 2025 07:23
Copilot finished reviewing on behalf of terrier989 November 21, 2025 07:25
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the platform detection mechanism for the cryptography_flutter plugin to simplify the logic and correctly limit support to Android, iOS, and macOS only.

Key changes:

  • Replaced conditional imports and asynchronous plugin availability checks with a simpler synchronous approach using _hasInitializedPlugin flag
  • Removed Linux and Windows platform declarations from pubspec.yaml
  • Simplified platform detection to use defaultTargetPlatform instead of dart:io.Platform

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
cryptography_flutter/pubspec.yaml Removed Linux and Windows platform configurations, limiting plugin to Android, iOS, and macOS
cryptography_flutter/lib/src/flutter_cryptography.dart Refactored plugin presence detection to use _hasInitializedPlugin flag; reordered hmac method
cryptography_flutter/lib/src/_internal.dart Replaced conditional imports with direct platform checks using defaultTargetPlatform; removed async plugin availability check and MissingPluginException handling
cryptography_flutter/lib/src/_internal_impl_non_browser.dart Deleted file (platform detection moved to _internal.dart)
cryptography_flutter/lib/src/_internal_impl_browser.dart Deleted file (platform detection moved to _internal.dart)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@terrier989 terrier989 merged commit a932ce5 into master Nov 21, 2025
20 checks passed
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.

2 participants