{"id":15509256,"url":"https://github.com/x-slayer/flutter_overlay_window","last_synced_at":"2025-04-07T05:16:14.917Z","repository":{"id":38228926,"uuid":"486314297","full_name":"X-SLAYER/flutter_overlay_window","owner":"X-SLAYER","description":"Flutter plugin for displaying flutter app over other apps on the screen","archived":false,"fork":false,"pushed_at":"2024-07-30T07:48:08.000Z","size":169,"stargazers_count":114,"open_issues_count":39,"forks_count":122,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-12-18T10:41:29.714Z","etag":null,"topics":["android","android-overlays","display-over-other-apps","flutter","flutter-overlay","flutter-plugin","overlay","overlay-window","truecaller"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/flutter_overlay_window","language":"Dart","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/X-SLAYER.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":"2022-04-27T18:50:22.000Z","updated_at":"2024-12-15T17:59:51.000Z","dependencies_parsed_at":"2024-03-30T15:25:29.591Z","dependency_job_id":"e5ec92ba-d326-4bd5-8703-a5b555e70fc8","html_url":"https://github.com/X-SLAYER/flutter_overlay_window","commit_stats":{"total_commits":60,"total_committers":3,"mean_commits":20.0,"dds":"0.033333333333333326","last_synced_commit":"faaff1f965649b0410c8107745bb64a8ff86a687"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/X-SLAYER%2Fflutter_overlay_window","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/X-SLAYER%2Fflutter_overlay_window/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/X-SLAYER%2Fflutter_overlay_window/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/X-SLAYER%2Fflutter_overlay_window/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/X-SLAYER","download_url":"https://codeload.github.com/X-SLAYER/flutter_overlay_window/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247595335,"owners_count":20963943,"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","android-overlays","display-over-other-apps","flutter","flutter-overlay","flutter-plugin","overlay","overlay-window","truecaller"],"created_at":"2024-10-02T09:41:50.250Z","updated_at":"2025-04-07T05:16:14.889Z","avatar_url":"https://github.com/X-SLAYER.png","language":"Dart","funding_links":["https://www.buymeacoffee.com/xslayer"],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/X-SLAYER/flutter_overlay_window/assets/22800380/d22ae453-e83d-4da6-ba68-f4eaef666ef1\" height=\"170\" alt=\"auto_route_logo\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://img.shields.io/badge/License-MIT-green\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/License-MIT-green\" alt=\"MIT License\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/X-SLAYER/flutter_overlay_window\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/stars/X-SLAYER/flutter_overlay_window?style=flat\u0026logo=github\u0026colorB=green\u0026label=stars\" alt=\"stars\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://pub.dev/packages/flutter_overlay_window\"\u003e\n    \u003cimg src=\"https://img.shields.io/pub/v/flutter_overlay_window.svg?label=pub\u0026color=orange\" alt=\"pub version\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.buymeacoffee.com/xslayer\" target=\"_blank\"\u003e\n    \u003cimg src=\"https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png\" alt=\"Buy Me A Coffee\" height=\"30px\" width= \"108px\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\nFlutter plugin for displaying your Flutter app over other apps on the screen\n\u003c/p\u003e\n\n---\n\n## Preview\n\n|                                                          TrueCaller overlay example                                                          |                                                        click-through overlay example                                                        |                                                         Messanger chat-head example                                                         |\n| :------------------------------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------------------------: |\n| \u003cimg src='https://user-images.githubusercontent.com/22800380/165636217-8957396b-dc54-4e6d-aa50-e8bfdb9383cf.gif' height='600' width='300' /\u003e | \u003cimg src='https://user-images.githubusercontent.com/22800380/165636120-dcd9ee13-5fca-4f8a-a562-b2f53c0b5e24.gif' height='600' width='300'/\u003e | \u003cimg src='https://user-images.githubusercontent.com/22800380/178730917-40f267bb-63a2-4ad3-ba69-f7c1285a1882.gif' height='600' width='300'/\u003e |\n\n## Installation\n\nAdd package to your pubspec:\n\n```yaml\ndependencies:\n  flutter_overlay_window: any # or the latest version on Pub\n```\n\n### Android\n\nYou'll need to add the `SYSTEM_ALERT_WINDOW` permission and `OverlayService` to your Android Manifest.\nReplace `explanation_for_special_use` with your custom explanation.\n\n```XML\n    \u003cuses-permission android:name=\"android.permission.SYSTEM_ALERT_WINDOW\" /\u003e\n    \u003cuses-permission android:name=\"android.permission.FOREGROUND_SERVICE\"/\u003e\n    \u003cuses-permission android:name=\"android.permission.FOREGROUND_SERVICE_SPECIAL_USE\" /\u003e\n\n    \u003capplication\u003e\n        ...\n        \u003cservice android:name=\"flutter.overlay.window.flutter_overlay_window.OverlayService\" \n            android:exported=\"false\"\n            android:foregroundServiceType=\"specialUse\"\u003e\n            \u003cproperty android:name=\"android.app.PROPERTY_SPECIAL_USE_FGS_SUBTYPE\"\n                android:value=\"explanation_for_special_use\"/\u003e\n        \u003c/service\u003e\n    \u003c/application\u003e\n```\n\n### Entry point\n\nInside `main.dart` create an entry point for your Overlay widget;\n\n```dart\n\n// overlay entry point\n@pragma(\"vm:entry-point\")\nvoid overlayMain() {\n  runApp(const MaterialApp(\n    debugShowCheckedModeBanner: false,\n    home: Material(child: Text(\"My overlay\"))\n  ));\n}\n\n```\n\n### USAGE\n\n```dart\n /// check if overlay permission is granted\n final bool status = await FlutterOverlayWindow.isPermissionGranted();\n\n /// request overlay permission\n /// it will open the overlay settings page and return `true` once the permission granted.\n final bool status = await FlutterOverlayWindow.requestPermission();\n\n  /// Open overLay content\n  ///\n  /// - Optional arguments:\n  ///\n  /// `height` the overlay height and default is [WindowSize.fullCover]\n  ///\n  /// `width` the overlay width and default is [WindowSize.matchParent]\n  ///\n  /// `alignment` the alignment postion on screen and default is [OverlayAlignment.center]\n  ///\n  /// `visibilitySecret` the detail displayed in notifications on the lock screen and default is [NotificationVisibility.visibilitySecret]\n  ///\n  /// `OverlayFlag` the overlay flag and default is [OverlayFlag.defaultFlag]\n  ///\n  /// `overlayTitle` the notification message and default is \"overlay activated\"\n  ///\n  /// `overlayContent` the notification message\n  ///\n  /// `enableDrag` to enable/disable dragging the overlay over the screen and default is \"false\"\n  ///\n  /// `positionGravity` the overlay postion after drag and default is [PositionGravity.none]\n  ///\n  /// `startPosition` the overlay start position and default is null\n await FlutterOverlayWindow.showOverlay();\n\n /// closes overlay if open\n await FlutterOverlayWindow.closeOverlay();\n\n /// broadcast data to and from overlay app\n await FlutterOverlayWindow.shareData(\"Hello from the other side\");\n\n /// streams message shared between overlay and main app\n  FlutterOverlayWindow.overlayListener.listen((event) {\n      log(\"Current Event: $event\");\n    });\n\n /// use [OverlayFlag.focusPointer] when you want to use fields that show keyboards\n await FlutterOverlayWindow.showOverlay(flag: OverlayFlag.focusPointer);\n\n\n /// update the overlay flag while the overlay in action\n await FlutterOverlayWindow.updateFlag(OverlayFlag.defaultFlag);\n\n /// Update the overlay size in the screen\n await FlutterOverlayWindow.resizeOverlay(80, 120);\n\n /// Update the overlay position in the screen\n ///\n /// `position` the new position of the overlay\n ///\n /// `return` true if the position updated successfully\n await FlutterOverlayWindow.moveOverlay(OverlayPosition(0, 156))\n\n /// Get the current overlay position\n ///\n /// `return` the current overlay position\n await FlutterOverlayWindow.getOverlayPosition()\n\n```\n\n```dart\n\nenum OverlayFlag {\n  /// Window flag: this window can never receive touch events.\n  /// Usefull if you want to display click-through overlay\n  clickThrough,\n\n  /// Window flag: this window won't ever get key input focus\n  /// so the user can not send key or other button events to it.\n  defaultFlag,\n\n  /// Window flag: allow any pointer events outside of the window to be sent to the windows behind it.\n  /// Usefull when you want to use fields that show keyboards.\n  focusPointer,\n}\n\n```\n\n```dart\n\n  /// Type of dragging behavior for the overlay.\n  enum PositionGravity {\n    /// The `PositionGravity.none` will allow the overlay to postioned anywhere on the screen.\n    none,\n\n    /// The `PositionGravity.right` will allow the overlay to stick on the right side of the screen.\n    right,\n\n    /// The `PositionGravity.left` will allow the overlay to stick on the left side of the screen.\n    left,\n\n    /// The `PositionGravity.auto` will allow the overlay to stick either on the left or right side of the screen depending on the overlay position.\n    auto,\n  }\n\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fx-slayer%2Fflutter_overlay_window","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fx-slayer%2Fflutter_overlay_window","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fx-slayer%2Fflutter_overlay_window/lists"}