搜索插件、代码仓与 APP 分类

neumorphic_button 封面
插件详情v0.0.1+2

neumorphic_button

创建一个具有多种可定制功能的拟态按钮,可在您的 Flutter 应用中随处使用。

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
3
喜欢数
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),
      )),
    );
  }
}

所属分类

源码仓库

使用此插件的项目

暂无相关数据。