amazing_button 0.0.3+1 amazing_button: ^0.0.3+1 copied to clipboard
A new Flutter buttons package project. You can get easily a pre-build buttons and can customize it.
import 'package:amazing_button/amazing_button.dart';
import 'package:flutter/material.dart';
void main() {
runApp(MaterialApp(
title: 'Amazing button demo application',
home: AmazingButtonDemo(),
));
}
class AmazingButtonDemo extends StatefulWidget {
AmazingButtonDemo({Key key}) : super(key: key);
@override
_AmazingButtonDemoState createState() => _AmazingButtonDemoState();
}
class _AmazingButtonDemoState extends State<AmazingButtonDemo> {
@override
Widget build(BuildContext context) {
return Center(
child: Column(
children: <Widget>[
//This is a default button
AmazingButton(onPressed: (){}),
// This is button types
AmazingButton.danger(onPressed: (){}),
AmazingButton.dark(onPressed: (){}),
AmazingButton.info(onPressed: (){}),
AmazingButton.light(onPressed: (){}),
AmazingButton.link(onPressed: (){}),
AmazingButton.secondery(onPressed: (){}),
AmazingButton.success(onPressed: (){}),
AmazingButton.warning(onPressed: (){}),
// This is customize button .you can chage it as you wish
AmazingButton(
onPressed: (){},
onLongPress: (){},
color: Colors.red,
backgroundColor: Colors.white,
text: "SignUp",
width: 200,
height: 50,
elevation: 10,
//and othe some ilelds
)
],
),
);
}
}