diff --git a/README.md b/README.md index 5b3c2c7..da4097a 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ To use the **Screen Protection Plugin** in your Flutter project, follow these si ```yaml dependencies: - screen_protection_plugin: + screen_protection: git: url: https://github.com/skanderhamdi/screen_protection.git ref: master diff --git a/android/src/main/kotlin/dz/alex/screen_protection/screen_protection/ScreenProtectionPlugin.kt b/android/src/main/kotlin/dz/alex/screen_protection/screen_protection/ScreenProtectionPlugin.kt index 8c28b46..9074e0e 100644 --- a/android/src/main/kotlin/dz/alex/screen_protection/screen_protection/ScreenProtectionPlugin.kt +++ b/android/src/main/kotlin/dz/alex/screen_protection/screen_protection/ScreenProtectionPlugin.kt @@ -64,30 +64,6 @@ class ScreenProtectionPlugin: FlutterPlugin, ActivityAware { channel.setMethodCallHandler(null) } - /*override fun onDetachedFromEngine(binding: FlutterPlugin.FlutterPluginBinding) { - channel.setMethodCallHandler(null) - } - override fun onMethodCall(call: MethodCall, result: Result) { - when(call.method) { - "secureScreen" -> { - secureScreen() - result.success(true) - } - "unsecureScreen" -> { - unsecureScreen() - result.success(true) - } - "toggleScreenSecurity" -> { - toggleScreenSecurity() - result.success(true) - } - "isScreenSecured" -> { - result.success(isScreenSecured()) - } - else -> result.notImplemented() - } - }*/ - fun secureScreen() { activity?.window?.addFlags(WindowManager.LayoutParams.FLAG_SECURE) }