https://github.com/ethiel97/nice_button
https://github.com/ethiel97/nice_button
Last synced: 8 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/ethiel97/nice_button
- Owner: Ethiel97
- License: mit
- Created: 2019-05-13T02:40:50.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-10-11T19:42:36.000Z (about 4 years ago)
- Last Synced: 2023-08-20T22:39:51.735Z (over 2 years ago)
- Language: Dart
- Size: 194 KB
- Stars: 28
- Watchers: 3
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# nice_button
[](https://pub.dev/packages/nice_button)
[](https://paypal.me/devEnthusiast?locale.x=en_US)
A Flutter package for Android and IOS to design nice buttons with no hassle in your app. Enjoy !
## Installation
Add the following to pubspec.yaml
```yaml
dependencies:
...
nice_button: ^0.1.7
```
## Usage Example
import nice_button.dart
```dart
import 'package:nice_button/nice_button.dart';
```
### For normal buttons
```dart
NiceButton(
width: 255,
elevation: 8.0,
radius: 52.0,
text: "Login",
background: yourColor,
onPressed: () {
print("hello");
},
),
```
### For mini buttons
Icon is required in this case
```dart
NiceButton(
mini: true,
icon: Icons.home,
background: yourColor,
onPressed: () {
print("hello");
},
)
```
### For gradient buttons
```dart
var firstColor = Color(0xff5b86e5), secondColor = Color(0xff36d1dc);
NiceButton(
radius: 40,
padding: const EdgeInsets.all(15),
text: "Register",
icon: Icons.account_box,
gradientColors: [secondColor, firstColor],
onPressed: () {},
)
```

**Refer to [example folder](example/README.md) and the source code for more information.**