패키지, 저장소 및 앱 카테고리 검색

flexiges 표지
패키지 상세v1.0.2

flexiges

Flexi는 개발자가 위젯을 쉽게 정확하게 드래그, 줌, 회전 및 스케일링할 수 있도록 설계된 동적이고 포괄적인 Flutter 패키지입니다. Flexi는 이를 간단하고 효율적으로 만들어줍니다.

AndroidiOSWebmacOSWindowsLinux
30일 다운로드
35
좋아요
4
Pub 점수
135

패키지 설치

flutter pub add flexiges

패키지 개요

공개 정보를 바탕으로 생성한 선택 가이드입니다.

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.

Alt Text

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:

dependencies:
  flexi: ^1.0.0

Usage

Import the package in your Dart file:

import 'package:flexi/flexi.dart';

Wrap your widget with the Flexi widget:

FlexiGes(
  child: YourWidget(),
  minScale: 0.8, // Set the minimum scale limit (optional)
  maxScale: 2.5, // Set the maximum scale limit (optional)
  onScaleUpdate: (offset, scale, rotation) {
    // Handle scale update event
  },
  onScaleEnd: (details) {
    // Handle scale end event
  },
)

Parameters

  1. child: The child widget that you want to apply zoom, pan, and rotate features to. (required)
  2. minScale: The minimum scale factor for scaling the widget. Defaults to 0.8. (optional)
  3. maxScale: The maximum scale factor for scaling the widget. Defaults to 2.5. (optional)
  4. 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)
  5. onScaleEnd: A callback function that is triggered when the scale event ends. It provides the scale end details as a parameter. (optional)
  6. canRotate: Flag to enable/disable rotation. Defaults to true. (optional)
  7. canScale: Flag to enable/disable scaling. Defaults to true. (optional)
  8. canTranslate: Flag to enable/disable translation. Defaults to true. (optional)
  9. returnToOrigin: Flag to enable/disable returning to the original state on double-tap. Defaults to true. (optional)
  10. enabled: Flag to enable/disable the Flexi widget. Defaults to true. (optional)
  11. maxTranslationX: The maximum translation value along the X-axis. Defaults to 100. (optional)
  12. 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.

카테고리

의존성

의존성 목록 1 개

소스 저장소

이 패키지를 사용하는 프로젝트

아직 데이터가 없습니다.