홈 / Tushar-Mishra999/Neumorphic_Button FLUTTER ECOSYSTEM Tushar-Mishra999/Neumorphic_Button Neumorphic 버튼용 패키지
Stars 2
Forks 2
최근 푸시(UTC) 2022. 12. 19.
프로젝트 상태 활성 GITHUB User @Tushar-Mishra999
언어 C++ CMake Dart HTML C Swift Kotlin Objective-C
사용 중인 의존성 의존성 목록 3 개 flutter {"sdk":"flutter"}flutter_test 개발 의존성 {"sdk":"flutter"}flutter_lints 개발 의존성 ^2.0.0원본 README 아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.
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
Add the latest version of package to your pubspec.yaml
dependencies:
neumorphic_button: ^0.0.1+2
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),
)),
);
}
}
https://github.com/Tushar-Mishra999/VisageR/raw/9321df2e794cb2d7ed3a5abf8eb25c0a4db8278e/assets/apple1.jpeg
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),
)),
);
}
}
https://github.com/Tushar-Mishra999/VisageR/raw/9321df2e794cb2d7ed3a5abf8eb25c0a4db8278e/assets/apple2.jpeg