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

neumorphic_button 封面
套件詳情v0.0.1+2

neumorphic_button

建立一個具有多種可自訂功能的擬態按鈕,可在您的 Flutter 應用中隨處使用。

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
5
喜歡數
50
Pub 分數
150

安裝套件

flutter pub add neumorphic_button

套件介紹

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

一個 Flutter 套件,讓開發者能夠建立簡潔、現代的擬物按鈕,並提供廣泛的自訂選項。這些按鈕具有柔和的陰影和微妙的深度效果,提升跨多個平台應用程式的視覺吸引力。該套件支援多種樣式屬性,例如顏色、陰影強度、邊框圓角和高度,讓整個應用程式實現一致的 UI 設計。非常適合尋求極簡但吸引人的介面的設計師,可輕鬆整合至現有的 Flutter 專案中。

適用情境

  • 創建視覺上吸引人的應用介面
  • 為互動元素增加深度
  • 設計具有現代美學的行動和網路應用程式
  • 在跨平台中實現一致的按鈕樣式
  • 透過觸覺反饋提升使用者體驗

主要特色

  • 可自訂的陰影和深度效果
  • 支援多個平台渲染
  • 可調節按鈕大小和圓角半徑
  • 可設定的色彩方案
  • 內建動畫支援
  • 與 Flutter 小部件輕鬆整合

適合對象

  • 使用Flutter的UI/UX設計師
  • 開發現代移動或網頁應用的開發者
  • 需要極簡設計語言的項目
  • 專注於視覺一致性的團隊
  • 針對 iOS 和 Android 的應用,採用統一的樣式

使用建議

  • 可能需要在低階設備上進行效能優化
  • 與標準按鈕相比,可存取性功能較少
  • 潛在的過度使用導致視覺雜亂
  • 不適合高對比度或深色主題過多的配色方案
  • 依賴外部相依性以實現完整功能

原始 README

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

Neumorphic Button

This package lets you create Neumorphic Button with a number of customizable features that can be used throughout your Flutter app.You can create a minimal visual design style that uses monochromatic colors, subtle shadows and low contrasts to showcase buttons and cards, creating a really soft look.

Installation

  1. Add the latest version of package to your pubspec.yaml
dependencies:
  neumorphic_button: ^0.0.1+2
  1. Import the package and use it in your Flutter App.
import 'package:neumorphic_button/neumorphic_button.dart';

Features

There are a number of properties that you can specify for your neumorphic button :

  • height
  • width
  • border-radius
  • box-shape
  • shadow-color
  • spread-radius
  • blur-radius
  • onTap function

Example

Light mode neumorphic button
class HomeScreen extends StatelessWidget {
  const HomeScreen({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    Size size = MediaQuery.of(context).size;
    return Scaffold(
      backgroundColor: Colors.grey.shade300,
      body: Center(
          child: NeumorphicButton(
        onTap: () {},
        child: Image.asset(
          'assets/apple.png',
          height: 80,
          color: Colors.grey[700],
        ),
        BorderRadius: 12,
        bottomRightShadowBlurRadius: 15,
        bottomRightShadowSpreadRadius: 1,
        borderWidth: 5,
        backgroundColor: Colors.grey.shade300,
        topLeftShadowBlurRadius: 15,
        topLeftShadowSpreadRadius: 1,
        topLeftShadowColor: Colors.white,
        bottomRightShadowColor: Colors.grey.shade500,
        height: size.width * 0.5,
        width: size.width * 0.5,
        padding: EdgeInsets.all(50),
        bottomRightOffset: Offset(4, 4),
        topLeftOffset: Offset(-4, -4),
      )),
    );
  }
}
Dark mode neumorphic button
class HomeScreen extends StatelessWidget {
  const HomeScreen({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    Size size = MediaQuery.of(context).size;
    return Scaffold(
      backgroundColor: Colors.grey.shade900,
      body: Center(
          child: NeumorphicButton(
        onTap: () {},
        child: Image.asset(
          'assets/apple.png',
          height: 80,
          color: Colors.grey[700],
        ),
        BorderRadius: 12,
        bottomRightShadowBlurRadius: 15,
        bottomRightShadowSpreadRadius: 1,
        borderWidth: 5,
        backgroundColor: Colors.grey.shade900,
        topLeftShadowBlurRadius: 15,
        topLeftShadowSpreadRadius: 1,
        topLeftShadowColor: Colors.grey.shade800,
        bottomRightShadowColor: Colors.black,
        height: size.width * 0.5,
        width: size.width * 0.5,
        padding: EdgeInsets.all(50),
        bottomRightOffset: Offset(5, 5),
        topLeftOffset: Offset(-5, -5),
      )),
    );
  }
}

所屬分類

原始碼儲存庫

使用此套件的專案

暫無相關資料。