NikuRaisedButton class

Niku extension for Material Raised Button

Style property builder for building Raised Button

Example usage:

NikuRaisedButton(Text("Raised Button"))
  .color(Colors.blue)
  .px(40)
  .py(20)
  .rounded(8)
  .my(8)
  .build()

Meta property list:

  • niku() - Switch to Niku() property
  • build() - Apply styles and build RaisedButton as Widget
  • base() - Apply styles and build only base of RaisedButton as Widget
  • apply() - Apply existing NikuOutlineButton's property to current style
  • style() - Apply existing NikuOutlineButton's property to current style and build
  • styleBase() - Apply existing NikuRaisedButton's property to current style and build only base

Style Property list:

  • onPressed - Callback when button is pressed
  • onLongPressed - Callback when button is long pressed
  • padding, p - Padding of container
    • padding, p - apply padding to all side
    • px - apply padding to x axis
    • py - apply padding y axis
    • pt - apply padding top side
    • pl - apply padding left side
    • pb - apply padding bottom side
    • pl - apply padding right side
  • margin, m - Padding of container
    • margin, m - apply margin to all side
    • mx - apply margin to x axis
    • my - apply margin y axis
    • mt - apply margin top side
    • ml - apply margin left side
    • mb - apply margin bottom side
    • ml - apply margin right side
  • setColor - Apply color to all button property
    • setColor - Apply all color property using named property
    • bg, color - Apply color to button background
    • disabled - Background color of button when disabled
    • hover - Background color of button when hovered
    • focus - Background color of button when focused
    • highlight - Background color of button when highlighted
    • splash - Splash/Ripple color of button
  • textColor - Set text color of button, won't override existing color
  • colorBrightness - Set brightness of background
  • shape - Apply custom shape to button
  • clip - Apply clip to button
  • minWidth - Set min width of button
  • height - Set height of button
  • autofocus - Determine whether button should be auto focus
  • theme - Apply style to button using existing theme
  • rounded - Apply border radius to button, will override shape
  • elevation - Apply elevation to raised button
    • setElevation - Set all elevation property
    • elevation - Apply elevation to raised button
    • focusElevation - Set elevation when focused
    • hoverElevation - Set elevation when hovered
    • highlightElevation - Set elevation when highlight
    • disabledElevation - Set elevatino when disabled

Constructors

NikuRaisedButton(Widget child)
Niku extension for Material Raised Button

Properties

child Widget
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

apply(NikuRaisedButton instance) NikuRaisedButton
Apply existing NikuRaisedButton's property to current style
autofocus(bool autofocus) NikuRaisedButton
Determine whether button should be auto focus
base({Key? key}) → dynamic
Apply styles and build only base of RaisedButton as Widget
bg(Color color) NikuRaisedButton
Apply color to button background
brightness(Brightness brightness) NikuRaisedButton
Set brightness of background
build({Key? key}) Widget
Apply styles and build RaisedButton as Widget
clip(Clip clip) NikuRaisedButton
Apply clip to button
color(Color color) NikuRaisedButton
Apply color to button background
disabled(Color color) NikuRaisedButton
Background color of button when disabled
disabledElevation(double elevation) NikuRaisedButton
Set elevation when disabled
elevation(double elevation) NikuRaisedButton
Apply elevation to raised button
focus(Color color) NikuRaisedButton
Background color of button when focused
focusElevation(double elevation) NikuRaisedButton
Set elevation when focused
highlight(Color color) NikuRaisedButton
Background color of button when highlighted
highlightElevation(double elevation) NikuRaisedButton
Set elevation when highlighted
hover(Color color) NikuRaisedButton
Background color of button when hovered
hoverElevation(double elevation) NikuRaisedButton
Set elevation when highlighted
m(double margin) NikuRaisedButton
Apply margin to top
margin(EdgeInsets padding) NikuRaisedButton
Apply margin using EdgeInset
mb(double margin) NikuRaisedButton
Apply margin to bottom
ml(double margin) NikuRaisedButton
Apply margin to left side
mr(double margin) NikuRaisedButton
Apply margin to right side
mt(double margin) NikuRaisedButton
Apply margin to top
mx(double margin) NikuRaisedButton
Apply margin to x axis
my(double margin) NikuRaisedButton
Apply margin to y axis
niku() Niku
Switch to Niku() property
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onLongPressed(VoidCallback callback) NikuRaisedButton
Callback when button is long pressed
onPressed(VoidCallback callback) NikuRaisedButton
Callback when button is pressed
p(double padding) NikuRaisedButton
Apply padding to all side
padding(EdgeInsets padding) NikuRaisedButton
Apply padding using EdgeInset
pb(double padding) NikuRaisedButton
Apply padding to bottom
pl(double padding) NikuRaisedButton
Apply padding to left side
pr(double padding) NikuRaisedButton
Apply padding to right
pt(double padding) NikuRaisedButton
Apply padding to top
px(double padding) NikuRaisedButton
Apply padding to x axis
py(double padding) NikuRaisedButton
Apply padding to y axis
rounded([double radius = 999999]) NikuRaisedButton
Apply border radius to button, will override shape
set({VoidCallback? onPressed, VoidCallback? onLongPressed, double pt = 0, double pb = 0, double pl = 0, double pr = 0, double mt = 0, double mb = 0, double ml = 0, double mr = 0, Color? color, Color? disabledColor, Color? focusColor, Color? hoverColor, Color? highlightColor, Color? splashColor, Color? textColor, Brightness? colorBrightness, double? elevation, double? focusElevation, double? hoverElevation, double? highlightElevation, double? disabledElevation, ShapeBorder? shape, Clip clipBehavior = Clip.antiAlias, bool autofocus = false, ButtonTextTheme? buttonTextTheme}) NikuRaisedButton
setColor({Color? color, Color? disabled, Color? focus, Color? hover, Color? highlight, Color? splash}) NikuRaisedButton
Apply all color property using named property
setElevation({double? elevation, double? disabled, double? focus, double? hover, double? highlight}) NikuRaisedButton
Set all elevation property
shape(ShapeBorder shape) NikuRaisedButton
Apply custom shape to button
splash(Color color) NikuRaisedButton
Splash/Ripple color of button
style(NikuRaisedButton instance) Widget
Apply existing NikuRaisedButton's property to current style and build
styleBase(NikuRaisedButton instance) Widget
Apply existing NikuRaisedButton's property to current style and build only base
textColor(Color color) NikuRaisedButton
Set text color of button, won't override existing color
theme(ButtonTextTheme theme) NikuRaisedButton
Apply style to button using existing theme
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited