CustomActionButton class
A highly customizable, unified button widget that leverages RistoDecorator to provide perfectly consistent backgrounds, gradients, borders, and shadows.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- CustomActionButton
Constructors
- CustomActionButton({Key? key, required Widget child, Widget? icon, double iconSpacing = 8.0, ButtonType? buttonType, VoidCallback? onPressed, VoidCallback? onLongPress, bool disabled = false, bool isLoading = false, Widget? loadingIndicator, Color? backgroundColor, Color? foregroundColor, Color? shadowColor, Color? splashColor, Color? disabledBackgroundColor, Color? disabledBorderColor, Color? disabledForegroundColor, Color? borderColor, double borderWidth = 1.0, double? elevation, double? borderRadius, double? width, double? height, double minHeight = 60.0, OutlinedBorder? shape, EdgeInsetsGeometry? padding, EdgeInsetsGeometry? margin, Gradient? backgroundGradient, Gradient? disabledBackgroundGradient, InteractiveInkFeatureFactory? splashFactory, MaterialTapTargetSize? tapTargetSize})
-
const
- CustomActionButton.elevated({Key? key, VoidCallback? onPressed, required Widget child, Widget? icon, double iconSpacing = 8.0, bool disabled = false, bool isLoading = false, Widget? loadingIndicator, Color? backgroundColor, Color? foregroundColor, Color? shadowColor, Color? splashColor, Color? disabledBackgroundColor, Color? disabledForegroundColor, Color? disabledBorderColor, Color? borderColor, double borderWidth = 1.0, double elevation = 2.0, double borderRadius = 8.0, OutlinedBorder? shape, double? width, double? height, double minHeight = 60.0, EdgeInsetsGeometry? padding, EdgeInsetsGeometry? margin, Gradient? backgroundGradient, Gradient? disabledBackgroundGradient, InteractiveInkFeatureFactory? splashFactory, MaterialTapTargetSize? tapTargetSize})
-
factory
- CustomActionButton.flat({Key? key, VoidCallback? onPressed, required Widget child, Widget? icon, double iconSpacing = 8.0, bool disabled = false, bool isLoading = false, Widget? loadingIndicator, Color? backgroundColor, Color? foregroundColor, Color? shadowColor, Color? splashColor, Color? disabledBackgroundColor, Color? disabledBorderColor, Color? disabledForegroundColor, Color? borderColor, double borderWidth = 1.0, double borderRadius = 8.0, OutlinedBorder? shape, double? width, double? height, double minHeight = 60.0, EdgeInsetsGeometry? padding, EdgeInsetsGeometry? margin, Gradient? backgroundGradient, Gradient? disabledBackgroundGradient, InteractiveInkFeatureFactory? splashFactory, MaterialTapTargetSize? tapTargetSize})
-
factory
- CustomActionButton.icon({Key? key, VoidCallback? onPressed, required Widget icon, required Widget label, ButtonType baseType = ButtonType.elevated, double iconSpacing = 8.0, bool disabled = false, bool isLoading = false, Widget? loadingIndicator, Color? backgroundColor, Color? foregroundColor, Color? shadowColor, Color? splashColor, Color? disabledBackgroundColor, Color? disabledBorderColor, Color? disabledForegroundColor, Color? borderColor, double borderWidth = 1.0, double? elevation, double? borderRadius, double? width, double? height, double minHeight = 60.0, OutlinedBorder? shape, EdgeInsetsGeometry? padding, EdgeInsetsGeometry? margin, Gradient? backgroundGradient, Gradient? disabledBackgroundGradient, InteractiveInkFeatureFactory? splashFactory, MaterialTapTargetSize? tapTargetSize})
-
factory
- CustomActionButton.iconOnly({Key? key, VoidCallback? onPressed, required Widget icon, ButtonType baseType = ButtonType.elevated, bool disabled = false, bool isLoading = false, Widget? loadingIndicator, Color? backgroundColor, Color? foregroundColor, Color? shadowColor, Color? splashColor, Color? disabledBackgroundColor, Color? disabledBorderColor, Color? disabledForegroundColor, Color? borderColor, double borderWidth = 1.0, Gradient? backgroundGradient, Gradient? disabledBackgroundGradient, double? size = 48.0, double? iconSize, EdgeInsetsGeometry? margin, OutlinedBorder? shape, double? elevation, InteractiveInkFeatureFactory? splashFactory, MaterialTapTargetSize tapTargetSize = MaterialTapTargetSize.padded})
-
factory
- CustomActionButton.longPress({Key? key, VoidCallback? onPressed, VoidCallback? onLongPress, required Widget child, Widget? icon, double iconSpacing = 8.0, bool disabled = false, bool isLoading = false, Widget? loadingIndicator, Color? backgroundColor, Color? foregroundColor, Color? shadowColor, Color? splashColor, Color? disabledBackgroundColor, Color? disabledBorderColor, Color? disabledForegroundColor, Color? borderColor, double borderWidth = 1.0, double elevation = 2.0, double borderRadius = 8.0, OutlinedBorder? shape, double? width, double? height, double minHeight = 60.0, EdgeInsetsGeometry? padding, EdgeInsetsGeometry? margin, Gradient? backgroundGradient, Gradient? disabledBackgroundGradient, InteractiveInkFeatureFactory? splashFactory, MaterialTapTargetSize? tapTargetSize})
-
factory
- CustomActionButton.minimal({Key? key, VoidCallback? onPressed, required Widget child, Widget? icon, double iconSpacing = 8.0, bool disabled = false, bool isLoading = false, Widget? loadingIndicator, Color? borderColor, double borderWidth = 1.0, Color? foregroundColor, Color? disabledBorderColor, Color? disabledForegroundColor, Color? shadowColor, double? width, double? height, double minHeight = 60.0, OutlinedBorder? shape, EdgeInsetsGeometry? padding, Gradient? disabledBackgroundGradient, EdgeInsetsGeometry? margin, MaterialTapTargetSize? tapTargetSize})
-
factory
- CustomActionButton.rounded({Key? key, VoidCallback? onPressed, required Widget child, Widget? icon, double iconSpacing = 8.0, bool disabled = false, bool isLoading = false, Widget? loadingIndicator, Color? backgroundColor, Color? foregroundColor, Color? shadowColor, Color? splashColor, Color? disabledBackgroundColor, Color? disabledBorderColor, Color? disabledForegroundColor, Color? borderColor, double borderWidth = 1.0, double? width, double? height, double minHeight = 60.0, EdgeInsetsGeometry? padding, EdgeInsetsGeometry? margin, double elevation = 2.0, Gradient? backgroundGradient, Gradient? disabledBackgroundGradient, InteractiveInkFeatureFactory? splashFactory, MaterialTapTargetSize? tapTargetSize})
-
factory
Properties
- backgroundColor → Color?
-
final
- backgroundGradient → Gradient?
-
final
- borderColor → Color?
-
final
- borderRadius → double?
-
final
- borderWidth → double
-
final
-
final
- child → Widget
-
final
- disabled → bool
-
Explicitly disables the button, rendering it in a greyed-out state and blocking interactions.
final
- disabledBackgroundColor → Color?
-
final
- disabledBackgroundGradient → Gradient?
-
final
- disabledBorderColor → Color?
-
final
- disabledForegroundColor → Color?
-
final
- elevation → double?
-
final
- foregroundColor → Color?
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- height → double?
-
final
- icon → Widget?
-
final
- iconSpacing → double
-
final
- isLoading → bool
-
Swaps the child for a loading indicator and blocks interactions,
but maintains the active button styling.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- loadingIndicator → Widget?
-
A custom loading indicator. Defaults to an adaptive CircularProgressIndicator.
final
- margin → EdgeInsetsGeometry?
-
final
- minHeight → double
-
final
- onLongPress → VoidCallback?
-
final
- onPressed → VoidCallback?
-
final
- padding → EdgeInsetsGeometry?
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- shadowColor → Color?
-
final
- shape → OutlinedBorder?
-
final
- splashColor → Color?
-
final
- splashFactory → InteractiveInkFeatureFactory?
-
final
- tapTargetSize → MaterialTapTargetSize?
-
final
- width → double?
-
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< CustomActionButton> -
Creates the mutable state for this widget at a given location in the tree.
override
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited