Plugin Migration#13
Open
PcolBP wants to merge 13 commits into
Open
Conversation
PcolBP
commented
May 13, 2026
Contributor
- Migrated plugin from Obsolete Android Implementation
- Migrated plugin to UIScene in IOS
- Added IOS Background Dark color
…+support-dark-theme-ios Upgrade ios android+support dark theme ios
There was a problem hiding this comment.
Pull request overview
This PR migrates the privacy_screen Flutter plugin’s native implementations to more modern platform lifecycles (AndroidX lifecycle + iOS UIScene) and adds an iOS-specific dark-mode overlay background color option.
Changes:
- Added
backgroundColorDarkto the Dart API and method-channel config, with iOS support for dark-mode overlay color selection. - Migrated iOS lifecycle handling to UIScene via
FlutterSceneLifeCycleDelegate. - Updated Android implementation to a non-obsolete lifecycle observer approach and modernized Android build tooling (AGP/Kotlin/Java + added Gradle wrapper files).
Reviewed changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| lib/src/privacy_screen.dart | Threads new backgroundColorDark option through enable() and native config updates. |
| lib/src/privacy_screen_state.dart | Extends state to store backgroundColorDark. |
| lib/src/privacy_screen_platform_interface.dart | Extends the platform interface to accept optional backgroundColorDark. |
| lib/src/privacy_screen_method_channel.dart | Sends backgroundColorDark to native iOS when provided. |
| ios/Classes/SwiftPrivacyScreenPlugin.swift | Adds UIScene lifecycle handling and dark-mode background color selection. |
| android/src/main/kotlin/ca/couver/privacy_screen/PrivacyScreenPlugin.kt | Reworks lifecycle + secure flag application using DefaultLifecycleObserver. |
| android/gradlew.bat | Adds Windows Gradle wrapper script for the Android module. |
| android/gradlew | Adds POSIX Gradle wrapper script for the Android module. |
| android/gradle/wrapper/gradle-wrapper.properties | Adds wrapper configuration (currently pointing at a milestone Gradle distribution). |
| android/build.gradle | Modernizes Android build configuration (namespace, SDK levels, Java/Kotlin/AGP, deps). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…+support-dark-theme-ios FIX: Comments from copilot
…+support-dark-theme-ios FIX: Not disappearing view
Convert the iOS plugin to pure Swift and add a Swift Package Manager manifest so Flutter no longer reports the plugin as SPM-incompatible. - Remove the Objective-C registrar shim (PrivacyScreenPlugin.h/.m) and rename SwiftPrivacyScreenPlugin -> PrivacyScreenPlugin (the pluginClass), exposed via @objc so the generated registrant resolves it directly. SPM does not allow mixed ObjC/Swift in a single target, so the plugin is now pure Swift. - Add ios/privacy_screen/Package.swift (target otp layout per Flutter's for-plugin-authors guide) with a FlutterFramework package dependency for Flutter 3.4x SPM integration. - Point the podspec source_files at the new Sources location and bump the iOS deployment target to 13.0 (Flutter's current floor). - Widen the Dart SDK constraint to <4.0.0 for Dart 3 consumers. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Convert the iOS plugin to pure Swift and add a Swift Package Manager manifest so Flutter no longer reports the plugin as SPM-incompatible. - Remove the Objective-C registrar shim (PrivacyScreenPlugin.h/.m) and rename SwiftPrivacyScreenPlugin -> PrivacyScreenPlugin (the pluginClass), exposed via @objc so the generated registrant resolves it directly. SPM does not allow mixed ObjC/Swift in a single target, so the plugin is now pure Swift. - Add ios/privacy_screen/Package.swift following Flutter's for-plugin-authors guide (implicit Flutter framework linkage, matching the first-party plugin layout). - Point the podspec source_files at the new Sources location and bump the iOS deployment target to 13.0 (Flutter's current floor). - Widen the Dart SDK constraint to <4.0.0 for Dart 3 consumers. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…thub.com/piotrbobinski-droid/privacy_screen into pb/feature/swift-package-manager-support
…ge-manager-support Pb/feature/swift package manager support
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.