FLUTTER ECOSYSTEM

schmidtwmark/FlutterSpinner

고정된 크기의 컨테이너 세트를 스크롤하는 애니메이션을 수행하는 Flutter 위젯입니다.

FlutterSpinner 프로젝트 이미지
Stars
8
Forks
1
최근 푸시(UTC)
2020. 4. 5.
프로젝트 상태
활성
Mark Schmidt GitHub avatar
GITHUB User

Mark Schmidt ↗

언어DartKotlinSwiftObjective-C

이 저장소가 배포한 패키지

사용 중인 의존성

의존성 목록 2 개
  • flutter{"sdk":"flutter"}
  • flutter_test개발 의존성{"sdk":"flutter"}

원본 README

아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.

README 펼치기 / 접기

Spinner

This flutter package implements a simple Spinner animation that cycles through any number of fixed size child widgets. Useful for selecting a random word from a list and displaying it to a user.

It can animate vertically, up or down:

https://raw.githubusercontent.com/schmidtwmark/FlutterSpinner/HEAD/example/VerticalScroll.gif

Or horizontally, left or right:

https://raw.githubusercontent.com/schmidtwmark/FlutterSpinner/HEAD/example/horizontalScroll.gif

Usage

To use this plugin, add spinner as a dependency in your pubspec.yaml file.

Example

See the example project in the repo for a quick demo

API

Spinner has several useful parameters. You can see them used in the example file

  • duration: change the duration of the animation

  • animationSpeed: change how fast the animation moves and what index the animation lands on

  • spinDirection: change the direction of animation

  • containerCount: number of containers that should appear on screen

  • containerSize: for vertical scroll, this is the width of each container produced by the builder function. For horizontal, this is the height

  • builder: a function that takes in an integer and returns a widget with height/width of containerSize

  • curve: the curve for the animation to follow. Defaults to easeInOutCubic

  • callback: a function called when the animation completes

  • zoomFactor: optional zoom in by this amount during the animation. It looks something like this, with a zoom factor of 1.5:

https://raw.githubusercontent.com/schmidtwmark/FlutterSpinner/HEAD/example/zoom.gif