{"id":22261384,"url":"https://github.com/adaptant-labs/flutter_windowmanager","last_synced_at":"2025-07-30T09:31:29.091Z","repository":{"id":50783732,"uuid":"217271963","full_name":"adaptant-labs/flutter_windowmanager","owner":"adaptant-labs","description":"A Flutter plugin for manipulating Android WindowManager LayoutParams.","archived":false,"fork":false,"pushed_at":"2023-08-20T14:00:22.000Z","size":5874,"stargazers_count":63,"open_issues_count":20,"forks_count":46,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-03T09:12:34.753Z","etag":null,"topics":["android","flutter","flutter-plugin","flutter-plugins"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/flutter_windowmanager","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/adaptant-labs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-10-24T10:23:18.000Z","updated_at":"2024-12-02T16:24:31.000Z","dependencies_parsed_at":"2024-06-18T22:43:15.067Z","dependency_job_id":"31dc7b3f-5dee-40b9-b967-32bc5364f831","html_url":"https://github.com/adaptant-labs/flutter_windowmanager","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adaptant-labs%2Fflutter_windowmanager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adaptant-labs%2Fflutter_windowmanager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adaptant-labs%2Fflutter_windowmanager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adaptant-labs%2Fflutter_windowmanager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adaptant-labs","download_url":"https://codeload.github.com/adaptant-labs/flutter_windowmanager/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227941970,"owners_count":17844681,"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","flutter-plugin","flutter-plugins"],"created_at":"2024-12-03T09:12:37.470Z","updated_at":"2024-12-04T13:14:50.609Z","avatar_url":"https://github.com/adaptant-labs.png","language":"Dart","readme":"# flutter_windowmanager\n\n[![Build Status](https://travis-ci.com/adaptant-labs/flutter_windowmanager.svg?branch=master)](https://app.travis-ci.com/github/adaptant-labs/flutter_windowmanager)\n[![Pub](https://img.shields.io/pub/v/flutter_windowmanager.svg)](https://pub.dartlang.org/packages/flutter_windowmanager)\n\nA Flutter plugin for manipulating Android WindowManager LayoutParams\ndynamically at application run-time.\n\n\u003cimg alt=\"Example App Use\" src=\"https://raw.githubusercontent.com/adaptant-labs/flutter_windowmanager/master/overview.gif\" width=\"270\"/\u003e\n\n## Motivation\n\nWhile Android natively supports a range of window modes, there was no\ngood way to set these dynamically within a running Flutter application -\ninstead requiring that these flags are set within the native\n`MainActivity` of the Flutter application itself.\n\nIn our App, we only wished to disable screenshots for specific screens,\nrather than across the entire application lifecycle. This can now be\naccomplished by simply calling:\n\n```\nawait FlutterWindowManager.addFlags(FlutterWindowManager.FLAG_SECURE);\n```\n\nfor the relevant screen.\n\nThis can further be toggled for a specific screen by either using a\n[RouteAware] mixin, or through direct toggling in `initState()` and\n`dispose()` methods in the case of stateful widgets.\n\n[RouteAware]: https://api.flutter.dev/flutter/widgets/RouteAware-class.html\n\n## Flags\n\nThe full range of [LayoutParams] flags are passed through. The plugin\nwill carry out basic API level checking and throw an error on any\nunsupported flag specification. Flags are implemented using a bitmask,\nand may be specified individually or ORed together for setting/clearing\nmultiple flags at once.\n\nThe current list of flags is:\n\n```\nFLAG_ALLOW_LOCK_WHILE_SCREEN_ON\nFLAG_ALT_FOCUSABLE_IM\nFLAG_DIM_BEHIND\nFLAG_FORCE_NOT_FULLSCREEN\nFLAG_FULLSCREEN\nFLAG_HARDWARE_ACCELERATED\nFLAG_IGNORE_CHEEK_PRESSES\nFLAG_KEEP_SCREEN_ON\nFLAG_LAYOUT_INSET_DECOR\nFLAG_LAYOUT_IN_SCREEN\nFLAG_LAYOUT_NO_LIMITS\nFLAG_NOT_FOCUSABLE\nFLAG_NOT_TOUCHABLE\nFLAG_NOT_TOUCH_MODAL\nFLAG_SCALED\nFLAG_SECURE\nFLAG_SHOW_WALLPAPER\nFLAG_SPLIT_TOUCH\nFLAG_WATCH_OUTSIDE_TOUCH\nFLAG_BLUR_BEHIND\nFLAG_DISMISS_KEYGUARD\nFLAG_DITHER\nFLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS\nFLAG_LAYOUT_ATTACHED_IN_DECOR\nFLAG_LAYOUT_IN_OVERSCAN\nFLAG_LOCAL_FOCUS_MODE\nFLAG_SHOW_WHEN_LOCKED\nFLAG_TOUCHABLE_WHEN_WAKING\nFLAG_TRANSLUCENT_NAVIGATION\nFLAG_TRANSLUCENT_STATUS\nFLAG_TURN_SCREEN_ON\n```\n\nIn practice, this plugin was developed primarily for the toggling of\n`FLAG_SECURE`. Other flags have not been tested, and we make no\nguarantees that toggling with any of the other flags will interact well\nwith Flutter - if you find specific problems with any particular flag,\nplease let us know in the [issue tracker][tracker].\n\n[LayoutParams]: https://developer.android.com/reference/android/view/WindowManager.LayoutParams.html\n\n## iOS Support\n\nAs `flutter_windowmanager` only wraps and exposes an underlying Android-specific\ninterface, there is no iOS support planned or possible. For those interested in\ncross-platform `FLAG_SECURE` functionality, this functionality has been re-created\nin the third-party [secure_application] package. Cross-platform `FLAG_KEEP_SCREEN_ON`\nfunctionality is provided by the third-party [keep_screen_on] package.\n\n[secure_application]: https://pub.dev/packages/secure_application\n[keep_screen_on]: https://pub.dev/packages/keep_screen_on\n\n## Features and bugs\n\nPlease file feature requests and bugs at the [issue tracker][tracker].\n\n[tracker]: https://github.com/adaptant-labs/flutter_windowmanager/issues\n\n## License\n\nLicensed under the terms of the Apache 2.0 license, the full version of which can be found in the\n[LICENSE] file included in the distribution.\n\n[LICENSE]: https://raw.githubusercontent.com/adaptant-labs/flutter_windowmanager/master/LICENSE","funding_links":[],"categories":["Dart"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadaptant-labs%2Fflutter_windowmanager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadaptant-labs%2Fflutter_windowmanager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadaptant-labs%2Fflutter_windowmanager/lists"}