NikuIconButton class
Niku extension for Material Raised Button
Style property builder for building Raised Button
Example usage:
NikuIconButton(Icon(Icons.edit))
.color(Colors.blue)
.p(40)
.build()
Meta property list:
- niku() - Switch to Niku() property
- build() - Apply styles and build RaisedButton as Widget
- apply() - Apply existing NikuOutlineButton's property to current style
- style() - Apply existing NikuOutlineButton's property to current style and build
Style Property list:
- onPressed - Callback when button is pressed
- visualDensity - Defines the visual density of user interface components
- 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
- alignment, align - Set self alignment
- align - Accept Alignment to align self
- topLeft - Apply widget to top-left
- topCenter - Apply widget to top-center
- topRight - Apply widget to top-right
- centerLeft - Apply widget to center-left
- center - Apply widget to center
- centerRight - Apply widget to center-right
- bottomLeft - Apply widget to bottom-left
- bottomCenter - Apply widget to bottom-center
- bottomRight - Apply widget to bottom-right
- splashRadius - The splash radius. If null, default splash radius of Material.defaultSplashRadius is used
- 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
- mouseCursor - The cursor for a mouse pointer when it enters or is hovering over the button
- focusNode - An optional focus node to use as the focus node for this widget
- autofocus - Determine whether button should be auto focus
- tooltip - Explaination of the button
- enableFeedback - Whether detected gestures should provide acoustic and/or haptic feedback
- constraints - Whether detected gestures should provide acoustic and/or haptic feedback
Constructors
- NikuIconButton(Widget _icon)
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
-
align(
Alignment align) → NikuIconButton - Apply alignment to widget
-
alignment(
Alignment align) → NikuIconButton - Apply alignment to widget
-
apply(
NikuIconButton instance) → NikuIconButton - Apply existing NikuIconButton's property to current style
-
autofocus(
bool autofocus) → NikuIconButton - Determine whether button should be auto focus
-
bottomCenter(
) → NikuIconButton - Apply widget to bottom center
-
bottomLeft(
) → NikuIconButton - Apply widget to bottom left
-
bottomRight(
) → NikuIconButton - Apply widget to bottom right
-
build(
{Key? key}) → IconButton - Apply existing NikuIconButton's property to current style and build
-
center(
) → NikuIconButton - Apply widget to center
-
centerLeft(
) → NikuIconButton - Apply widget to center left
-
centerRight(
) → NikuIconButton - Apply widget to center right
-
color(
Color color) → NikuIconButton - Apply color to button background
-
constraints(
BoxConstraints boxConstraints) → NikuIconButton - Whether detected gestures should provide acoustic and/or haptic feedback
-
disabled(
Color color) → NikuIconButton - Background color of button when disabled
-
enableFeedback(
bool enableFeedback) → NikuIconButton - Whether detected gestures should provide acoustic and/or haptic feedback
-
focus(
Color color) → NikuIconButton - Background color of button when focused
-
focusNode(
FocusNode focusNode) → NikuIconButton - An optional focus node to use as the focus node for this widget
-
highlight(
Color color) → NikuIconButton - Background color of button when highlighted
-
hover(
Color color) → NikuIconButton - Background color of button when hovered
-
mouseCursor(
MouseCursor click) → NikuIconButton - The cursor for a mouse pointer when it enters or is hovering over the button
-
niku(
) → Niku - Switch to Niku() property
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onPressed(
VoidCallback callback) → NikuIconButton - Callback when button is pressed
-
p(
double padding) → NikuIconButton - Apply padding to all side
-
padding(
EdgeInsets padding) → NikuIconButton -
Apply padding using
EdgeInset
-
pb(
double padding) → NikuIconButton - Apply padding to bottom
-
pl(
double padding) → NikuIconButton - Apply padding to left side
-
pr(
double padding) → NikuIconButton - Apply padding to right
-
pt(
double padding) → NikuIconButton - Apply padding to top
-
px(
double padding) → NikuIconButton - Apply padding to x axis
-
py(
double padding) → NikuIconButton - Apply padding to y axis
-
set(
{double iconSize = 24, VisualDensity? visualDensity, double pt = 0, double pl = 0, double pb = 0, double pr = 0, Alignment alignment = Alignment.center, double? splashRadius, Color? color, Color? focusColor, Color? hoverColor, Color? highlightColor, Color? splashColor, Color? disabledColor, VoidCallback? onPressed, MouseCursor mouseCursor = SystemMouseCursors.click, FocusNode? focusNode, bool autofocus = false, String? tooltip, bool enableFeedback = true, BoxConstraints? constraints}) → NikuIconButton -
setColor(
{Color? color, Color? disabled, Color? focus, Color? hover, Color? highlight, Color? splash}) → NikuIconButton - Apply all color property using named property
-
splash(
Color color) → NikuIconButton - Splash/Ripple color of button
-
splashRadius(
double radius) → NikuIconButton - The splash radius. If null, default splash radius of Material.defaultSplashRadius is used
-
style(
NikuIconButton instance) → IconButton - Apply existing NikuIconButton's property to current style and build
-
tooltip(
String tooltip) → NikuIconButton - Determine whether button should be auto focus
-
topCenter(
) → NikuIconButton - Apply widget to top center
-
topLeft(
) → NikuIconButton - Apply widget to top left
-
topRight(
) → NikuIconButton - Apply widget to top right
-
toString(
) → String -
A string representation of this object.
inherited
-
visualDensity(
VisualDensity visualDensity) → NikuIconButton - Defines the visual density of user interface components
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited