Zoom Tap Animation

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.


Source of idea

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.


Check out the example project in the example folder.


add the package to your dependencies

  zoom_tap_animation: ^1.1.0
import 'package:zoom_tap_animation/zoom_tap_animation.dart';


default use of ZoomTapAnimation widget

      onTap: (){},
      child: YOUR_WIDGET

and you can also define custom parameters

      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

also you can use ZoomTapAnimation with your custom gestures

      child: GestureDetector(
      onTap: () {},
      onLongPress: (){},
      onDoubleTap: (){},
      // you can add more gestures...
      child: Container(color: Colors.yellow, width: 100.0, height: 100.0),


childyour child widget that you want to put the zoom effect on.
onTapwhat should happen when you tap on the widget.null
onLongTapwhat should happen when you long tap on the widget.null
enableLongTapRepeatEventoption to enable long tap loop which repeat every onTap event (in case onLongTap is specified, it repeats the onLongTap event).false
longTapRepeatDurationthe duration between every onTap/onLongTap loop event.const Duration(milliseconds: 100)
beginthe size of widget you want to begin with.1.0
endthe size of widget you want to begin with.0.93
beginDurationthe duration of the begin zoom in animation.const Duration(milliseconds: 20)
endDurationthe duration of the end zoom in animation.const Duration(milliseconds: 120)
beginCurvethe curve animation type of the begin zoom in animation.Curves.decelerate
endCurvethe curve animation type of the end zoom in animation.Curves.fastOutSlowIn