{"id":20004646,"url":"https://github.com/kingtous/flutter_custom_cursor","last_synced_at":"2025-09-20T00:32:57.142Z","repository":{"id":64601817,"uuid":"576881630","full_name":"Kingtous/flutter_custom_cursor","owner":"Kingtous","description":"Create/Set a custom mouse cursor directly from a memory buffer easily! use with https://github.com/Kingtous/engine  if you are using flutter stable on Windows currently.","archived":false,"fork":false,"pushed_at":"2023-02-02T02:59:52.000Z","size":332,"stargazers_count":5,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-02T22:23:20.286Z","etag":null,"topics":["cursor","flutter","flutter-desktop","flutter-plugin","linux","macos","windows"],"latest_commit_sha":null,"homepage":"","language":"C++","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/Kingtous.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}},"created_at":"2022-12-11T09:46:28.000Z","updated_at":"2025-03-27T01:51:33.000Z","dependencies_parsed_at":"2023-02-17T13:45:44.746Z","dependency_job_id":null,"html_url":"https://github.com/Kingtous/flutter_custom_cursor","commit_stats":null,"previous_names":["kdogeone/flutter_custom_cursor","ketadotcc/flutter_custom_cursor","kingtous/flutter_custom_cursor"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/Kingtous/flutter_custom_cursor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kingtous%2Fflutter_custom_cursor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kingtous%2Fflutter_custom_cursor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kingtous%2Fflutter_custom_cursor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kingtous%2Fflutter_custom_cursor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Kingtous","download_url":"https://codeload.github.com/Kingtous/flutter_custom_cursor/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kingtous%2Fflutter_custom_cursor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276022571,"owners_count":25571820,"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","status":"online","status_checked_at":"2025-09-19T02:00:09.700Z","response_time":108,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["cursor","flutter","flutter-desktop","flutter-plugin","linux","macos","windows"],"created_at":"2024-11-13T05:31:51.318Z","updated_at":"2025-09-20T00:32:56.645Z","avatar_url":"https://github.com/Kingtous.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# flutter_custom_cursor\n\n![](https://img.shields.io/pub/v/flutter_custom_cursor?color=green)\n![](https://img.shields.io/pub/publisher/flutter_custom_cursor)\n\nThis plugin allows to create/set a custom mouse cursor directly from a memory buffer.\n\n\n\nBig thanks to imiskolee to create the [base of this plugin](https://github.com/imiskolee/flutter_custom_cursor).\n\n## Platforms\n\n- [x] macOS\n- [x] Windows\n- [x] Linux\n\nNote: Currently, the api required by this plugin on Windows is included in flutter `master` branch. It means that u need to use this plugin with flutter master branch on Windows platform. See [flutter engine PR#36143](https://github.com/flutter/engine/pull/36143) for details.\n\nUpdate: the latest Flutter `3.7.0` does not contain PR above, which merges to `flutter-3.7.0-candidate.2`, while Flutter stable `3.7.0` is using `flutter-3.7.0-candidate.1`. This limitation will be lifted maybe in the next Flutter stable release.\n\n# Get prepared\n\n## Register your custom cursor before\n\n```dart\n// register this cursor\ncursorName = await CursorManager.instance.registerCursor(CursorData()\n  ..name = \"test\"\n  ..buffer =\n      Platform.isWindows ? memoryCursorDataRawBGRA : memoryCursorDataRawPNG\n  ..height = img.height\n  ..width = img.width\n  ..hotX = 0\n  ..hotY = 0);\n```\n\nNote that a String `cacheName` will be returned by the function `registerCursor`, which can be used to set this cursor to system or delete this cursor.\n\n`CursorData.buffer` is a `Uint8List` which contains the cursor data. Be aware that on Windows, `buffer` is formatted by `rawBGRA`, other OS(s) are `rawPNG`.\n\nsee the example project for details.\n\n## Set the custom cursor\n\nWe have implemented the `FlutterCustomMemoryImageCursor` class, which is a subclass of `MouseCursor`. This class will automatically set the memory cursor for you. Keep it simple.\n\n```dart\nMouseRegion(\n  cursor: FlutterCustomMemoryImageCursor(key: cursorName),\n  child: Row(\n    children: [\n      Text(\"Memory image here\", style: style),\n    ],\n  ),\n),\n```\n\n## Delete the cursor \n\nYou can delete a cursor with the `cursorName`.\n\n```dart\nawait CursorManager.instance.deleteCursor(\"cursorName\");\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkingtous%2Fflutter_custom_cursor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkingtous%2Fflutter_custom_cursor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkingtous%2Fflutter_custom_cursor/lists"}