v1.1.0
zoom_tap_animation
줌 탭 애니메이션을 사용하면 오늘 탭의 앱 스토어 항목과 유사한 효과를 만들 수 있습니다. 항목을 길게 터치하면 확대된 후 축소됩니다.
139좋아요 3.3천30일 다운로드140Pub 점수
AndroidiOSWebmacOSWindowsLinux
Zoom Tap Animation은 App Store(ios 앱)의 '오늘' 탭에서 항목을 길게 터치했을 때 발생하는 줌 애니메이션 효과를 구현할 수 있게 해주는 패키지입니다. 항목을 누르면 확대되고, 떼면 축소됩니다.
{"sdk":"flutter"}{"sdk":"flutter"}아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.
Zoom Tap Animation is is a package that allows you to make an zoom animation effect similar to App Store's (ios app) items in Today tab, when you long tap on some item, it start to zoom in then it zoom out when you release it.
The idea is inspired from App Store app in Today tab where you can long tap on some item and it start to zoom in then zoom out as shown in the screenshot below.
https://raw.githubusercontent.com/KreatorDev/zoom_tap_animation/main/screenshots/original_idea.gifCheck out the example project in the example folder.
https://raw.githubusercontent.com/KreatorDev/zoom_tap_animation/main/screenshots/example.gifdependencies:
zoom_tap_animation: ^1.1.0
import 'package:zoom_tap_animation/zoom_tap_animation.dart';
ZoomTapAnimation(
onTap: (){},
child: YOUR_WIDGET
);
ZoomTapAnimation(
child: YOUR_WIDGET,
onTap: (){},
onLongTap: (){},
enableLongTapRepeatEvent: false,
longTapRepeatDuration: const Duration(milliseconds: 100),
begin: 1.0,
end: 0.93,
beginDuration: const Duration(milliseconds: 20),
endDuration: const Duration(milliseconds: 120),
beginCurve: Curves.decelerate,
endCurve: Curves.fastOutSlowIn
);
ZoomTapAnimation(
child: GestureDetector(
onTap: () {},
onLongPress: (){},
onDoubleTap: (){},
// you can add more gestures...
child: Container(color: Colors.yellow, width: 100.0, height: 100.0),
),
);
| parameter | description | default |
|---|---|---|
| child | your child widget that you want to put the zoom effect on. | |
| onTap | what should happen when you tap on the widget. | null |
| onLongTap | what should happen when you long tap on the widget. | null |
| enableLongTapRepeatEvent | option to enable long tap loop which repeat every onTap event (in case onLongTap is specified, it repeats the onLongTap event). | false |
| longTapRepeatDuration | the duration between every onTap/onLongTap loop event. | const Duration(milliseconds: 100) |
| begin | the size of widget you want to begin with. | 1.0 |
| end | the size of widget you want to begin with. | 0.93 |
| beginDuration | the duration of the begin zoom in animation. | const Duration(milliseconds: 20) |
| endDuration | the duration of the end zoom in animation. | const Duration(milliseconds: 120) |
| beginCurve | the curve animation type of the begin zoom in animation. | Curves.decelerate |
| endCurve | the curve animation type of the end zoom in animation. | Curves.fastOutSlowIn |