{"id":15556262,"url":"https://github.com/pouyamaroufi/secure-flutter-app","last_synced_at":"2025-04-23T20:31:13.294Z","repository":{"id":173673402,"uuid":"604779060","full_name":"pouyamaroufi/Secure-Flutter-App","owner":"pouyamaroufi","description":"Block Screen Shots and Screen Record for iOS and Android in Flutter without using any package","archived":false,"fork":false,"pushed_at":"2023-10-04T14:45:21.000Z","size":15,"stargazers_count":15,"open_issues_count":2,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-18T04:56:06.964Z","etag":null,"topics":["android","flutter","ios","kotlin","screenreader","screenshot","security-tools","swift"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pouyamaroufi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-02-21T19:17:23.000Z","updated_at":"2024-11-16T14:24:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"5f318a74-f410-4afe-adef-696de67b4f7c","html_url":"https://github.com/pouyamaroufi/Secure-Flutter-App","commit_stats":null,"previous_names":["pouyamaroufi/secure-flutter-app"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pouyamaroufi%2FSecure-Flutter-App","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pouyamaroufi%2FSecure-Flutter-App/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pouyamaroufi%2FSecure-Flutter-App/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pouyamaroufi%2FSecure-Flutter-App/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pouyamaroufi","download_url":"https://codeload.github.com/pouyamaroufi/Secure-Flutter-App/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250509411,"owners_count":21442421,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","flutter","ios","kotlin","screenreader","screenshot","security-tools","swift"],"created_at":"2024-10-02T15:12:53.309Z","updated_at":"2025-04-23T20:31:13.289Z","avatar_url":"https://github.com/pouyamaroufi.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Make Your iOS and Android App Secure\n\n## Block ScreenShots and Screen Recording without adding any packages in Flutter\n\n:bulb: Notic: Only works on real Device | the codes dosen't works on simulator for both platform\n\n\n\n## Android\n\nAdd this to `MainActivity` in android/app/src/main/kotlin/com/PackegeName/ProjectName\n\n```kotlin\npackage com.example.test // replace your packageName\n\nimport android.view.WindowManager.LayoutParams\nimport io.flutter.embedding.android.FlutterActivity\nimport io.flutter.embedding.engine.FlutterEngine\n\nclass MainActivity: FlutterActivity() {\n  override fun configureFlutterEngine(flutterEngine: FlutterEngine) {\n    window.addFlags(LayoutParams.FLAG_SECURE)\n    super.configureFlutterEngine(flutterEngine)\n  }\n}\n```\n\n\n\n## iOS\n\nAdd this to `AppDelegate` in ios/Runner/AppDelegate.swift\n\n```Swift\nimport UIKit\nimport Flutter\n\n\n@UIApplicationMain\n@objc class AppDelegate: FlutterAppDelegate {\n  override func application(\n    _ application: UIApplication,\n    didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?\n  ) -\u003e Bool {\n    self.window.makeSecure() // + add this line\n    GeneratedPluginRegistrant.register(with: self)\n    return super.application(application, didFinishLaunchingWithOptions: launchOptions)\n  }\n}\n\n// +  add this section\n\nextension UIWindow {\nfunc makeSecure() {\n    let field = UITextField()\n    field.isSecureTextEntry = true\n    self.addSubview(field)\n    field.centerYAnchor.constraint(equalTo: self.centerYAnchor).isActive = true\n    field.centerXAnchor.constraint(equalTo: self.centerXAnchor).isActive = true\n    self.layer.superlayer?.addSublayer(field.layer)\n    field.layer.sublayers?.first?.addSublayer(self.layer)\n  }\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpouyamaroufi%2Fsecure-flutter-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpouyamaroufi%2Fsecure-flutter-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpouyamaroufi%2Fsecure-flutter-app/lists"}