메모리 버퍼를 사용하여 데스크톱 플랫폼에서 사용자 정의 마우스 커서를 설정할 수 있는 Flutter 패키지입니다. 커서 데이터를 메모리에서 직접 로드함으로써 커서 외관에 대한 정밀한 제어가 가능하며, 고유하거나 동적 커서 디자인을 필요로 하는 애플리케이션에 이상적입니다. 이 패키지는 Windows, Linux, macOS 전용으로 설계되었으며, Flutter의 데스크톱 타겟과 원활하게 통합됩니다. 외부 파일에 의존하지 않고 고급 커서 맞춤설정을 지원하여 UI 디자인의 성능과 유연성을 향상시킵니다.
사용 사례
게임 내 사용자 정의 커서
인터랙티브 UI 요소
데스크톱 애플리케이션 브랜딩
동적 커서 변경
고성능 커서 렌더링
접근성 기능
주요 기능
직접 메모리 버퍼 입력
크로스 플랫폼 桌면 지원
외부 파일 종속 없음
고성능
Flutter와의 간편한 통합
애니메이션 커서를 지원합니다
적합한 대상
데스크톱 앱 개발자
게임 개발자
UI/UX 디자이너
고유한 커서 동작이 필요한 애플리케이션
성능에 민감한 프로젝트
고려 사항
데스크톱 플랫폼에 한정
플랫폼별 구현 지식이 필요합니다
커서 버퍼를 위한 메모리 관리
모바일 앱에 적합하지 않습니다
커서 크기 및 형식 제약
특정 OS 버전과의 호환성 문제 가능성
원본 README
연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.
flutter_custom_cursor
This plugin allows to create/set a custom mouse cursor directly from a memory buffer.
Note: 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 for details.
Update: 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.
Note 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.
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.
see the example project for details.
Set the custom cursor
We have implemented the FlutterCustomMemoryImageCursor class, which is a subclass of MouseCursor. This class will automatically set the memory cursor for you. Keep it simple.