rupinderjeet / flutter_scale_tap

A fork that fixes nested usage of ScaleTap widgets. Here's the reported issue: https://github.com/fedeamura/flutter_scale_tap/issues/2

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ScaleTap

Scale and opacity animated Button for Flutter

Getting Started

Wrap your widget with ScaleTap

ScaleTap(
  onPressed: (){
    //Tap
  },
  onLongPress: (){
    //Long press
  },
  child: Container(
    child: Text("Tap Me"),
  ),
)

You can change the default behaviour with the ScaleTapConfig class

class ScaleTapConfig {
  static double scaleMinValue = 0.95;
  static Curve scaleCurve = CurveSpring();
  static double opacityMinValue = 0.90;
  static Curve opacityCurve = Curves.ease;
  static Duration scaleOpacityAnimationDuration = const Duration(milliseconds: 300);
  static Duration buttonAnimationDuration = const Duration(milliseconds: 300);
}

About

A fork that fixes nested usage of ScaleTap widgets. Here's the reported issue: https://github.com/fedeamura/flutter_scale_tap/issues/2

License:MIT License


Languages

Language:Dart 100.0%