FLUTTER ECOSYSTEM

bizz84/pushable_button

一個用 Flutter 建構的 3D 可按壓按鈕。適用於應用中重要的行動呼籲。

可推動的按鈕 專案封面
Stars
34
Forks
12
最近推送(UTC)
2024年8月14日
專案狀態
未封存
Andrea Bizzotto GitHub avatar
GITHUB User

Andrea Bizzotto ↗

Flutter GDE ❖ Creator of codewithandrea.com ❖ YouTube: nnbd.me/yt ❖ Complete Dart Course: nnbd.me/dart

https://codewithandrea.comLondon官方網站 ↗
語言DartHTMLSwiftKotlinObjective-C

技術主題

此儲存庫發佈的套件

使用的依賴

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

原始 README

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

展開 / 收合專案 README

Pushable Button

Pub Language License Twitter

A 3D pushable button built in Flutter. Ideal for important CTAs in the app.

PushableButton preview

Usage

PushableButton(
  child: Text('ENROLL NOW', style: someTextStyle),
  height: 60,
  elevation: 8,
  hslColor: HSLColor.fromAHSL(1.0, 120, 1.0, 0.37),
  shadow: BoxShadow(
    color: Colors.grey.withOpacity(0.5),
    spreadRadius: 5,
    blurRadius: 7,
    offset: Offset(0, 2),
  ),
  onPressed: () => print('Button Pressed!'),
)

Configurable Properties

  • child: child widget (normally a Text or Icon)
  • height: height of the top layer
  • elevation: elevation or "gap" between the top and bottom layer
  • hslColor: color of the top layer. HSLColor is used instead of Color so that the bottom layer is automatically calculated by reducing the luminosity
  • shadow: an optional shadow to make the button look better
  • onPressed: button callback
LICENSE: MIT