Flexiges는 드래그, 줌, 회전, 스케일링과 같은 동적 터치 상호작용을 쉽게 구현할 수 있도록 도와주는 Flutter 패키지입니다. 정밀성과 간편함을 고려해 설계되었으며, 직관적인 제스처 컨트롤을 통해 사용자 경험을 향상시킵니다. Android, iOS, Web, macOS, Windows, Linux 등 다양한 플랫폼을 지원하여 크로스플랫폼 애플리케이션에 유연하게 활용할 수 있습니다. 최소한의 설정으로 기존 프로젝트에 원활하게 통합되어 개발자가 인터랙티브하고 반응형 UI를 만들 수 있도록 합니다.
사용 사례
인터랙티브 UI 컴포넌트
드래그 앤 드롭 인터페이스
확대 가능한 이미지 뷰어
회전 가능한 2D 요소
손짓 기반 애니메이션
상호작용 콘텐츠를 갖춘 교육 앱
주요 기능
위젯을 드래그하고 확대/축소, 회전 및 스케일링
고정밀 제스처 처리
크로스 플랫폼 호환성
필수 구성 최소화
부드러운 애니메이션 전환
여러 터치 포인트를 지원합니다
적합한 대상
인터랙티브 앱을 개발하는 개발자
제스처를 구현하는 UI/UX 디자이너
교육용 또는 게임 애플리케이션
동적 위젯 조작이 필요한 앱
빠른 프로토타이핑에 집중하는 팀
고려 사항
복잡한 중첩 위젯과 함께 성능에 영향을 줄 수 있습니다
변환 상태를 신중하게 다뤄야 합니다
정적 레이아웃에 적합하지 않음
터치 기기용으로 가장 적합
고급 변환에 대한 사용자 지정이 제한적
원본 README
연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.
Flexi
Flexi is a Flutter package that provides a flexible widget for zooming, panning, and rotating child widgets.
Features
Zoom in and out of a widget.
Pan the widget by dragging it.
Rotate the widget using gestures.
Double-tap to reset the widget to its original state.
Configurable minimum and maximum scale limits.
Configurable maximum translation limits along the X and Y axes.
Enable/disable rotation, scaling, and translation individually.
Support for custom callbacks on scale start, update, and end events.
Installation
Add the following dependency to your pubspec.yaml file:
child: The child widget that you want to apply zoom, pan, and rotate features to. (required)
minScale: The minimum scale factor for scaling the widget. Defaults to 0.8. (optional)
maxScale: The maximum scale factor for scaling the widget. Defaults to 2.5. (optional)
onScaleUpdate: A callback function that is triggered during the scale update event. It provides the current offset, scale factor, and rotation angle as parameters. (optional)
onScaleEnd: A callback function that is triggered when the scale event ends. It provides the scale end details as a parameter. (optional)
canRotate: Flag to enable/disable rotation. Defaults to true. (optional)
canScale: Flag to enable/disable scaling. Defaults to true. (optional)
canTranslate: Flag to enable/disable translation. Defaults to true. (optional)
returnToOrigin: Flag to enable/disable returning to the original state on double-tap. Defaults to true. (optional)
enabled: Flag to enable/disable the Flexi widget. Defaults to true. (optional)
maxTranslationX: The maximum translation value along the X-axis. Defaults to 100. (optional)
maxTranslationY: The maximum translation value along the Y-axis. Defaults to 100. (optional)
Example
Check out the example directory for a working example of using the Flexi widget.
Running Tests
To run the tests for the Flexi package, use the following command:
flutter test flexi_test.dart
Contributing
Contributions are welcome! Please submit any issues or pull requests via the GitHub repository.
License
This project is licensed under the MIT License.
Feel free to customize the content further based on your package's specific details and testing instructions.