{"id":13552243,"url":"https://github.com/bitsdojo/bitsdojo_window","last_synced_at":"2026-02-19T21:04:06.314Z","repository":{"id":37368746,"uuid":"316599298","full_name":"bitsdojo/bitsdojo_window","owner":"bitsdojo","description":"A Flutter package that makes it easy to customize and work with your Flutter desktop app window.","archived":false,"fork":false,"pushed_at":"2023-12-24T00:42:49.000Z","size":254,"stargazers_count":841,"open_issues_count":119,"forks_count":245,"subscribers_count":22,"default_branch":"master","last_synced_at":"2026-02-14T21:48:01.459Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://www.youtube.com/watch?v=bee2AHQpGK4","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/bitsdojo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":["bitsdojo"]}},"created_at":"2020-11-27T21:01:55.000Z","updated_at":"2026-02-11T06:02:22.000Z","dependencies_parsed_at":"2023-12-23T16:25:30.648Z","dependency_job_id":"6b91cf7e-5943-4a08-b7ba-abb6a832a02a","html_url":"https://github.com/bitsdojo/bitsdojo_window","commit_stats":{"total_commits":46,"total_committers":12,"mean_commits":"3.8333333333333335","dds":0.5652173913043479,"last_synced_commit":"9b83939c321caa438da4be598f527f028e0efa5f"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/bitsdojo/bitsdojo_window","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitsdojo%2Fbitsdojo_window","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitsdojo%2Fbitsdojo_window/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitsdojo%2Fbitsdojo_window/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitsdojo%2Fbitsdojo_window/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bitsdojo","download_url":"https://codeload.github.com/bitsdojo/bitsdojo_window/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitsdojo%2Fbitsdojo_window/sbom","scorecard":{"id":240846,"data":{"date":"2025-08-11","repo":{"name":"github.com/bitsdojo/bitsdojo_window","commit":"978d1eea0097a43dfcd89efe98cfef67ad2cd0da"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.7,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Code-Review","score":3,"reason":"Found 9/30 approved changesets -- score normalized to 3","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/build_test.yaml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build_test.yaml:53: update your workflow using https://app.stepsecurity.io/secureworkflow/bitsdojo/bitsdojo_window/build_test.yaml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build_test.yaml:59: update your workflow using https://app.stepsecurity.io/secureworkflow/bitsdojo/bitsdojo_window/build_test.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build_test.yaml:80: update your workflow using https://app.stepsecurity.io/secureworkflow/bitsdojo/bitsdojo_window/build_test.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build_test.yaml:87: update your workflow using https://app.stepsecurity.io/secureworkflow/bitsdojo/bitsdojo_window/build_test.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build_test.yaml:94: update your workflow using https://app.stepsecurity.io/secureworkflow/bitsdojo/bitsdojo_window/build_test.yaml/master?enable=pin","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 9 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-17T06:39:26.415Z","repository_id":37368746,"created_at":"2025-08-17T06:39:26.415Z","updated_at":"2025-08-17T06:39:26.415Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29623546,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-19T13:04:20.082Z","status":"ssl_error","status_checked_at":"2026-02-19T13:03:33.775Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2024-08-01T12:02:01.050Z","updated_at":"2026-02-19T21:04:06.299Z","avatar_url":"https://github.com/bitsdojo.png","language":"Dart","readme":"[![Pub Version](https://img.shields.io/pub/v/bitsdojo_window)](https://pub.dev/packages/bitsdojo_window)\n[![Pub Popularity](https://img.shields.io/pub/popularity/bitsdojo_window)](https://pub.dev/packages/bitsdojo_window)\n[![Pub Points](https://img.shields.io/pub/points/bitsdojo_window)](https://pub.dev/packages/bitsdojo_window)\n\n[![GitHub Stars](https://img.shields.io/github/stars/bitsdojo/bitsdojo_window)](https://github.com/bitsdojo/bitsdojo_window/stargazers)\n[![Build Test](https://github.com/bitsdojo/bitsdojo_window/actions/workflows/build_test.yaml/badge.svg)](https://github.com/bitsdojo/bitsdojo_window/actions/workflows/build_test.yaml)\n[![GitHub License](https://img.shields.io/github/license/bitsdojo/bitsdojo_window)](https://github.com/bitsdojo/bitsdojo_window/blob/main/LICENSE)\n\n# bitsdojo_window\n\nA [Flutter package](https://pub.dev/packages/bitsdojo_window) that makes it easy to customize and work with your Flutter desktop app window on **Windows**, **macOS** and **Linux**.\n\nWatch the tutorial to get started. Click the image below to watch the video:\n\n[![IMAGE ALT TEXT](https://img.youtube.com/vi/bee2AHQpGK4/0.jpg)](https://www.youtube.com/watch?v=bee2AHQpGK4 \"Click to open\")\n\n\u003cimg src=\"https://raw.githubusercontent.com/bitsdojo/bitsdojo_window/master/resources/screenshot.png\"\u003e\n\n**Features**:\n\n- Custom window frame - remove standard Windows/macOS/Linux titlebar and buttons\n- Hide window on startup\n- Show/hide window\n- Move window using Flutter widget\n- Minimize/Maximize/Restore/Close window\n- Set window size, minimum size and maximum size\n- Set window position\n- Set window alignment on screen (center/topLeft/topRight/bottomLeft/bottomRight)\n- Set window title\n\n# Getting Started\n\nAdd the package to your project's `pubspec.yaml` file manually or using the command below:\n\n```shell\npub add bitsdojo_window\n```\n\nThe `pubspec.yaml` file should look like this:\n\n```diff\n// pubspec.yaml\n\n  ...\n\n  dependencies:\n    flutter:\n      sdk: flutter\n+ bitsdojo_window: ^0.1.6\n\n  dev_dependencies:\n\n  ...\n```\n\n# For Windows apps\n\nInside your application folder, go to `windows\\runner\\main.cpp` and change the code look like this:\n\n```diff\n// windows/runner/main.cpp\n\n  ...\n\n  #include \"flutter_window.h\"\n  #include \"utils.h\"\n\n+ #include \u003cbitsdojo_window_windows/bitsdojo_window_plugin.h\u003e\n+ auto bdw = bitsdojo_window_configure(BDW_CUSTOM_FRAME | BDW_HIDE_ON_STARTUP);\n\n  int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev,\n\n  ...\n```\n\n# For macOS apps\n\nInside your application folder, go to `macos\\runner\\MainFlutterWindow.swift` and change the code look like this:\n\n```diff\n// macos/runner/MainFlutterWindow.swift\n\n  import Cocoa\n  import FlutterMacOS\n+ import bitsdojo_window_macos\n\n- class MainFlutterWindow: NSWindow {\n+ class MainFlutterWindow: BitsdojoWindow {\n+     override func bitsdojo_window_configure() -\u003e UInt {\n+     return BDW_CUSTOM_FRAME | BDW_HIDE_ON_STARTUP\n+   }\n      override func awakeFromNib() {\n\n      ...\n\n    }\n  }\n```\n\n#\n\nIf you don't want to use a custom frame and prefer the standard window titlebar and buttons, you can remove the `BDW_CUSTOM_FRAME` flag from the code above.\n\nIf you don't want to hide the window on startup, you can remove the `BDW_HIDE_ON_STARTUP` flag from the code above.\n\n# For Linux apps\n\nInside your application folder, go to `linux\\my_application.cc` and change the code look like this:\n\n```diff\n// linux/my_application.cc\n\n  ...\n  #include \"flutter/generated_plugin_registrant.h\"\n+ #include \u003cbitsdojo_window_linux/bitsdojo_window_plugin.h\u003e\n\n  struct _MyApplication {\n\n  ...\n\n  }\n\n+  auto bdw = bitsdojo_window_from(window);\n+  bdw-\u003esetCustomFrame(true);\n-  gtk_window_set_default_size(window, 1280, 720);\n   gtk_widget_show(GTK_WIDGET(window));\n\n   g_autoptr(FlDartProject) project = fl_dart_project_new();\n\n  ...\n\n  }\n\n```\n\n# Flutter app integration\n\nNow go to `lib\\main.dart` and change the code look like this:\n\n```diff\n// lib/main.dart\n\n  import 'package:flutter/material.dart';\n+ import 'package:bitsdojo_window/bitsdojo_window.dart';\n\n void main() {\n   runApp(MyApp());\n\n+   doWhenWindowReady(() {\n+     const initialSize = Size(600, 450);\n+     appWindow.minSize = initialSize;\n+     appWindow.size = initialSize;\n+     appWindow.alignment = Alignment.center;\n+     appWindow.show();\n+   });\n }\n```\n\nThis will set an initial size and a minimum size for your application window, center it on the screen and show it on the screen.\n\nYou can find examples in the [example](./bitsdojo_window/example) folder.\n\nHere is an example that displays this window:\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand\u003c/summary\u003e\n\n```dart\nimport 'package:flutter/material.dart';\nimport 'package:bitsdojo_window/bitsdojo_window.dart';\n\nvoid main() {\n  runApp(const MyApp());\n  doWhenWindowReady(() {\n    final win = appWindow;\n    const initialSize = Size(600, 450);\n    win.minSize = initialSize;\n    win.size = initialSize;\n    win.alignment = Alignment.center;\n    win.title = \"Custom window with Flutter\";\n    win.show();\n  });\n}\n\nconst borderColor = Color(0xFF805306);\n\nclass MyApp extends StatelessWidget {\n  const MyApp({Key? key}) : super(key: key);\n\n  @override\n  Widget build(BuildContext context) {\n    return MaterialApp(\n      debugShowCheckedModeBanner: false,\n      home: Scaffold(\n        body: WindowBorder(\n          color: borderColor,\n          width: 1,\n          child: Row(\n            children: const [LeftSide(), RightSide()],\n          ),\n        ),\n      ),\n    );\n  }\n}\n\nconst sidebarColor = Color(0xFFF6A00C);\n\nclass LeftSide extends StatelessWidget {\n  const LeftSide({Key? key}) : super(key: key);\n  @override\n  Widget build(BuildContext context) {\n    return SizedBox(\n        width: 200,\n        child: Container(\n            color: sidebarColor,\n            child: Column(\n              children: [\n                WindowTitleBarBox(child: MoveWindow()),\n                Expanded(child: Container())\n              ],\n            )));\n  }\n}\n\nconst backgroundStartColor = Color(0xFFFFD500);\nconst backgroundEndColor = Color(0xFFF6A00C);\n\nclass RightSide extends StatelessWidget {\n  const RightSide({Key? key}) : super(key: key);\n  @override\n  Widget build(BuildContext context) {\n    return Expanded(\n      child: Container(\n        decoration: const BoxDecoration(\n          gradient: LinearGradient(\n              begin: Alignment.topCenter,\n              end: Alignment.bottomCenter,\n              colors: [backgroundStartColor, backgroundEndColor],\n              stops: [0.0, 1.0]),\n        ),\n        child: Column(children: [\n          WindowTitleBarBox(\n            child: Row(\n              children: [Expanded(child: MoveWindow()), const WindowButtons()],\n            ),\n          )\n        ]),\n      ),\n    );\n  }\n}\n\nfinal buttonColors = WindowButtonColors(\n    iconNormal: const Color(0xFF805306),\n    mouseOver: const Color(0xFFF6A00C),\n    mouseDown: const Color(0xFF805306),\n    iconMouseOver: const Color(0xFF805306),\n    iconMouseDown: const Color(0xFFFFD500));\n\nfinal closeButtonColors = WindowButtonColors(\n    mouseOver: const Color(0xFFD32F2F),\n    mouseDown: const Color(0xFFB71C1C),\n    iconNormal: const Color(0xFF805306),\n    iconMouseOver: Colors.white);\n\nclass WindowButtons extends StatelessWidget {\n  const WindowButtons({Key? key}) : super(key: key);\n  @override\n  Widget build(BuildContext context) {\n    return Row(\n      children: [\n        MinimizeWindowButton(colors: buttonColors),\n        MaximizeWindowButton(colors: buttonColors),\n        CloseWindowButton(colors: closeButtonColors),\n      ],\n    );\n  }\n}\n```\n\n\u003c/details\u003e\n\n#\n\n# **Want to help? Become a sponsor**\n\nI am developing this package in my spare time and any help is appreciated.\n\nIf you want to help you can [become a sponsor](https://github.com/sponsors/bitsdojo).\n\n🙏 Thank you!\n\n## ☕️ Current sponsors:\n\nNo sponsors\n","funding_links":["https://github.com/sponsors/bitsdojo"],"categories":["实用工具","Dart","工具集","Packages","Desktop [🔝](#readme)","Utilities"],"sub_categories":["桌面应用","桌面端","Desktop"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitsdojo%2Fbitsdojo_window","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbitsdojo%2Fbitsdojo_window","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitsdojo%2Fbitsdojo_window/lists"}