NikuOutlineButton class

Niku extension for Material Outline Button

Style property builder for building Outline Button

Example usage:

NikuOutlineButton(Text("Outline 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 OutlineButton as Widget
  • base() - Apply styles and build only base of OutlineButton 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 NikuOutlineButton'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
  • shape - Apply custom shape to button
  • clip - Apply clip to 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
  • border, borderSide - Set border of button
    • border, borderSide - Set border using BorderSide
    • borderWidth - Set border width
    • borderColor - Set border color
    • borderStyle - Set border style
  • setBorderColor - Set all border color
  • color - Set border color
  • highlightBorderColor - Set border color when highlighted
  • disabledBorderColor - Set border color when disabled

Constructors

NikuOutlineButton(Widget child)
Niku extension for Material Outline 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(NikuOutlineButton instance) NikuOutlineButton
Apply existing NikuOutlineButton's property to current style
autofocus(bool autofocus) NikuOutlineButton
Determine whether button should be auto focus
base({Key? key}) Widget
Apply styles and build only base of OutlineButton as Widget
bg(Color color) NikuOutlineButton
Apply color to button background
border(BorderSide borderSide) NikuOutlineButton
Set border using BorderSide
borderColor(Color color) NikuOutlineButton
Set border color
borderSide(BorderSide borderSide) NikuOutlineButton
Set border using BorderSide
borderStyle(BorderStyle style) NikuOutlineButton
Set border style
borderWidth(double width) NikuOutlineButton
Set border width
build({Key? key}) Widget
Apply styles and build OutlineButton as Widget
clip(Clip clip) NikuOutlineButton
Apply clip to button
color(Color color) NikuOutlineButton
Apply color to button background
disabledBorderColor(Color color) NikuOutlineButton
Set Set border color when disabled
focus(Color color) NikuOutlineButton
Background color of button when focused
highlight(Color color) NikuOutlineButton
Background color of button when highlighted
highlightedBorderColor(Color color) NikuOutlineButton
Set Set border color when highlighted
hover(Color color) NikuOutlineButton
Background color of button when hovered
m(double margin) NikuOutlineButton
Apply margin to top
margin(EdgeInsets padding) NikuOutlineButton
Apply margin using EdgeInset
mb(double margin) NikuOutlineButton
Apply margin to bottom
ml(double margin) NikuOutlineButton
Apply margin to left side
mr(double margin) NikuOutlineButton
Apply margin to right side
mt(double margin) NikuOutlineButton
Apply margin to top
mx(double margin) NikuOutlineButton
Apply margin to x axis
my(double margin) NikuOutlineButton
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) NikuOutlineButton
Callback when button is long pressed
onPressed(VoidCallback callback) NikuOutlineButton
Callback when button is pressed
p(double padding) NikuOutlineButton
Apply padding to all side
padding(EdgeInsets padding) NikuOutlineButton
Apply padding using EdgeInset
pb(double padding) NikuOutlineButton
Apply padding to bottom
pl(double padding) NikuOutlineButton
Apply padding to left side
pr(double padding) NikuOutlineButton
Apply padding to right
pt(double padding) NikuOutlineButton
Apply padding to top
px(double padding) NikuOutlineButton
Apply padding to x axis
py(double padding) NikuOutlineButton
Apply padding to y axis
rounded([double radius = 999999]) NikuOutlineButton
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? focusColor, Color? hoverColor, Color? highlightColor, Color? splashColor, Color? textColor, BorderSide? borderSide, Color? disabledBorderColor, Color? highlightedBorderColor, ShapeBorder? shape, Clip clipBehavior = Clip.antiAlias, bool autofocus = false, ButtonTextTheme? buttonTextTheme}) NikuOutlineButton
setBorderColor({Color? color, Color? disabled, Color? highlighted}) NikuOutlineButton
Set Set border color when highlighted
setColor({Color? color, Color? focus, Color? hover, Color? highlight, Color? splash}) NikuOutlineButton
Apply all color property using named property
shape(ShapeBorder shape) NikuOutlineButton
Apply custom shape to button
splash(Color color) NikuOutlineButton
Splash/Ripple color of button
style(NikuOutlineButton instance) Widget
Apply existing NikuOutlineButton's property to current style and build
styleBase(NikuOutlineButton instance) Widget
Apply existing NikuOutlineButton's property to current style and build only base
textColor(Color color) NikuOutlineButton
Set text color of button, won't override existing color
theme(ButtonTextTheme theme) NikuOutlineButton
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