搜尋套件、儲存庫與 APP 分類

animated_button 封面
套件詳情v0.3.1

animated_button

一個簡單且高度可自訂的動畫按鈕,具有類似3D的效果。

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
979
喜歡數
169
Pub 分數
140

安裝套件

flutter pub add animated_button

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

一個簡單且高度可自訂的動畫按鈕,提供類似3D的視覺效果。基於Flutter建構,透過流暢的動畫與回應式反饋增強使用者互動。此按鈕支援自訂樣式、色彩過渡以及跨多個平台的可擴展效果。非常適合重視視覺吸引力與互動性的現代UI。可無縫整合至針對Android、iOS、Web、macOS、Windows及Linux開發的應用程式中。

適用情境

  • 互動式應用介面
  • 遊戲化使用者體驗
  • 現代移動和Web應用程式
  • 增強的表單提交
  • 數位產品中的視覺反饋

主要特色

  • 3D 類動畫效果
  • 高度可自訂的外觀
  • 平滑過渡動畫
  • 跨平台相容性
  • 與 Flutter 的輕鬆整合
  • 響應式觸控反饋

適合對象

  • 尋求引人入勝的使用者介面元素的 Flutter 開發者
  • 注重設計的應用程式
  • 需要互動式按鈕的應用程式
  • 原型化動態介面
  • 追求精緻視覺設計的專案

使用建議

  • 可能影響低階裝置的效能
  • 自訂需要了解 Flutter 動畫
  • 僅限基本按鈕功能,不含額外邏輯
  • 不適合複雜的手勢互動
  • 最佳搭配按鈕內的輕量內容使用

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。

Animated Button

A very simple and customizable animated button. Providing simple animation, and many customizable attributes such height, width, child, ... etc.

Getting Started

Nothing difficult here, yet!

Simple Example

import 'package:animated_button/animated_button.dart';
import 'package:flutter/material.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Animated Button Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: Demo(),
    );
  }
}

class Demo extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child:             AnimatedButton(
          onPressed: () {},
          color: Colors.blue,
          enabled: true,
          disabledColor: Colors.grey,
          shadowDegree: ShadowDegree.light,
          borderRadius: 8,
          duration: 85,
          height: 40,
          width: 140,
          child: Text(
            'Animated button',
            style: TextStyle(
              fontSize: 14,
              color: Colors.white,
              fontWeight: FontWeight.w500,
            ),
          ),
        ),
      ),
    );
  }
}

Button attributes

AnimatedButton(
child: ...,			    // Child widget, Row, Text, Column,...etc.
onPressed: () {},  	// Callback for onTap event
duration: 70,  		  // Animaton duration, default is 70 Milliseconds
height: 100,  		  // Button Height, default is 64
width: 200,  			  // Button width, default is 200
enabled: true,  		// When disabled, onTap won't be called
shadowDegree: ShadowDegree.dark, // Shadow color is generated from button color,
color: Colors.blue,
disabledColor: Colors.grey,
borderRadius: 8,
)

For more examples, check example folder

License

MIT License.

所屬分類

原始碼儲存庫

使用此套件的專案

暫無相關資料。