DButton class
Use static method to return custom button widget like DButton.circle(child: Icon(Icons.favorite))
Constructors
- DButton()
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
border(
{Color mainColor = Colors.white, required Color borderColor, double borderWidth = 2.0, Color splashColor = Colors.grey, Color disableColor = Colors.grey, Function? onClick, Function? onDoubleClick, Function? onLongClick, double? width, double? height, EdgeInsetsGeometry? padding, required Widget child, double radius = 4.0, Offset shadowOffset = Offset.zero}) → Widget - return custom button which has border
-
circle(
{Color mainColor = Colors.white, Color splashColor = Colors.grey, Color? shadowColor, Color disableColor = Colors.grey, Function? onClick, Function? onDoubleClick, Function? onLongClick, double? diameter, EdgeInsetsGeometry? padding, required Widget child, Offset shadowOffset = Offset.zero}) → Widget - return custom button circle
-
elevation(
{Color mainColor = Colors.white, Color splashColor = Colors.grey, Color disableColor = Colors.grey, Color? shadowColor, Function? onClick, Function? onDoubleClick, Function? onLongClick, double? width, double? height, double? elevation, EdgeInsetsGeometry? padding, required Widget child, double radius = 4.0}) → Widget - return custom button which has elevation
-
flat(
{Color mainColor = Colors.white, Color splashColor = Colors.grey, Color disableColor = Colors.grey, Function? onClick, Function? onDoubleClick, Function? onLongClick, double? width, double? height, EdgeInsetsGeometry? padding, required Widget child, double radius = 4.0}) → Widget - flat return custom button which has flat
-
shadow(
{Color mainColor = Colors.white, Color splashColor = Colors.grey, Color shadowColor = Colors.black38, Color disableColor = Colors.grey, Function? onClick, Function? onDoubleClick, Function? onLongClick, double? width, double? height, EdgeInsetsGeometry? padding, required Widget child, double radius = 4.0, Offset shadowOffset = Offset.zero}) → Widget -
shadow return custom button which has shadow
mainColor
body color of button. Default: Colors.whitesplashColor
color for splash effect. Default: Colors.greyshadowColor
color for shadow button. Default: Colors.black38disableColor
color button if button disable / function onClick off. Default: Colors.greyonClick
action when button clickedonDoubleClick
action when button double clickedonLongClick
action when button long presswidth
width of buttonheight
height of buttonpadding
padding of buttonchild
child of button. Widget can be anything as can as possibleradius
radius for angle button. Default: 4.0shadowOffset
Position of shadow button. Default: Offset.zero