{"id":13785247,"url":"https://github.com/SongbookPro/flutter_windows_single_instance","last_synced_at":"2025-05-11T20:32:41.595Z","repository":{"id":62458568,"uuid":"476871076","full_name":"SongbookPro/flutter_windows_single_instance","owner":"SongbookPro","description":null,"archived":false,"fork":false,"pushed_at":"2023-12-17T14:29:48.000Z","size":93,"stargazers_count":10,"open_issues_count":4,"forks_count":6,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-08-03T19:09:19.856Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","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/SongbookPro.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-01T21:17:32.000Z","updated_at":"2024-04-10T04:34:55.000Z","dependencies_parsed_at":"2023-12-17T15:31:06.720Z","dependency_job_id":"763567f0-aa2c-4281-aab1-1fceaa08bc56","html_url":"https://github.com/SongbookPro/flutter_windows_single_instance","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SongbookPro%2Fflutter_windows_single_instance","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SongbookPro%2Fflutter_windows_single_instance/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SongbookPro%2Fflutter_windows_single_instance/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SongbookPro%2Fflutter_windows_single_instance/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SongbookPro","download_url":"https://codeload.github.com/SongbookPro/flutter_windows_single_instance/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225094394,"owners_count":17419986,"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":[],"created_at":"2024-08-03T19:00:58.457Z","updated_at":"2024-11-17T21:31:11.987Z","avatar_url":"https://github.com/SongbookPro.png","language":"C++","readme":"# Windows Single Instance\n\nRestrict a Windows app to only be able to open one instance at a time.\n\n## Installing\n\n1. Add `WidgetsFlutterBinding.ensureInitialized();` to the start of your apps `main` function.\n1. Add the `async` modifier to your apps `main` function.\n1. Add a call to `WindowsSingleInstance.ensureSingleInstance()`, passing the apps startup args, a custom app string unique to your app (a-z, 0-9, \\_ and - only), and an optional callback function.\n\n## Example\n\n```\nvoid main(List\u003cString\u003e args) async {\n    WidgetsFlutterBinding.ensureInitialized();\n    await WindowsSingleInstance.ensureSingleInstance(\n        args,\n        \"custom_identifier\",\n        onSecondWindow: (args) {\n            print(args);\n        });\n    runApp(const MyApp());\n}\n```\n","funding_links":[],"categories":["Packages"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSongbookPro%2Fflutter_windows_single_instance","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FSongbookPro%2Fflutter_windows_single_instance","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSongbookPro%2Fflutter_windows_single_instance/lists"}