FLUTTER ECOSYSTEM

fedeamura/flutter_scale_tap

縮放/透明度動畫按鈕

flutter_scale_tap 專案封面
Stars
9
Forks
4
最近推送(UTC)
2022年9月19日
專案狀態
未封存
Federico Amura GitHub avatar
GITHUB User

Federico Amura ↗

語言Dart

此儲存庫發佈的套件

使用的依賴

依賴清單 2 項
  • flutter{"sdk":"flutter"}
  • flutter_test開發依賴{"sdk":"flutter"}

原始 README

以下為英文專案原文快照,最新內容請造訪 GitHub。

展開 / 收合專案 README

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);
}