Skip to content

Plugin Migration#13

Open
PcolBP wants to merge 13 commits into
eddyuan:masterfrom
PcolBP:master
Open

Plugin Migration#13
PcolBP wants to merge 13 commits into
eddyuan:masterfrom
PcolBP:master

Conversation

@PcolBP

@PcolBP PcolBP commented May 13, 2026

Copy link
Copy Markdown
Contributor
  privacy_screen:
    git:
      url: https://github.com/PcolBP/privacy_screen
      ref: master
  1. Migrated plugin from Obsolete Android Implementation
  2. Migrated plugin to UIScene in IOS
  3. Added IOS Background Dark color

Copilot AI review requested due to automatic review settings May 13, 2026 07:15

Copilot AI left a comment

Copy link
Copy Markdown

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 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 backgroundColorDark to 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.

Comment thread lib/src/privacy_screen_state.dart
Comment thread ios/privacy_screen/Sources/privacy_screen/PrivacyScreenPlugin.swift
Comment thread android/gradle/wrapper/gradle-wrapper.properties Outdated
Comment thread android/build.gradle
Comment thread android/build.gradle Outdated
piotrbobinski-droid and others added 8 commits May 13, 2026 10:25
…+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>
…ge-manager-support

Pb/feature/swift package manager support
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.

3 participants