SinglePressButton class
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- SinglePressButton
Constructors
-
SinglePressButton({Key? key, required Widget child, SinglePressButtonType? type = SinglePressButtonType.normal, Future<
void> onPressed()?, EdgeInsetsGeometry? padding, EdgeInsetsGeometry? margin, Color? backgroundColor, Gradient? backgroundGradient, Gradient? disabledBackgroundGradient, Color? disabledBackgroundColor, Color? foregroundColor, Color? disabledForegroundColor, Color? borderColor, Color? disabledBorderColor, double borderRadius = 8.0, TextStyle? textStyle, double? elevation, Color? shadowColor, OutlinedBorder? shape, bool showLoadingIndicator = false, Color? loadingIndicatorColor, double? width, double? height, VoidCallback? onStartProcessing, VoidCallback? onFinishProcessing, void onError(Object error)?}) -
const
-
SinglePressButton.rounded({Key? key, required Widget child, Future<
void> onPressed()?, EdgeInsetsGeometry? padding, EdgeInsetsGeometry? margin, Color? backgroundColor, Gradient? backgroundGradient, Gradient? disabledBackgroundGradient, Color? disabledBackgroundColor, Color? foregroundColor, Color? disabledForegroundColor, Color? borderColor, Color? disabledBorderColor, double borderRadius = 8.0, TextStyle? textStyle, double? elevation, Color? shadowColor, OutlinedBorder? shape, bool showLoadingIndicator = false, Color? loadingIndicatorColor, double? width, double? height, VoidCallback? onStartProcessing, VoidCallback? onFinishProcessing, void onError(Object error)?}) -
Factory for the rounded version (uses
CustomActionButton.rounded)factory
Properties
- backgroundColor → Color?
-
The background color of the button when enabled.
final
- backgroundGradient → Gradient?
-
The gradient used for the button background.
final
- borderColor → Color?
-
The border color of the button when enabled.
final
- borderRadius → double
-
The border radius of the button.
final
- child → Widget
-
The widget below this widget in the tree.
final
- disabledBackgroundColor → Color?
-
The background color of the button when disabled.
final
- disabledBackgroundGradient → Gradient?
-
The gradient used for the button background when disabled.
final
- disabledBorderColor → Color?
-
The border color of the button when disabled.
final
- disabledForegroundColor → Color?
-
The foreground color of the button when disabled.
final
- elevation → double?
-
The elevation of the button.
final
- foregroundColor → Color?
-
The foreground color (text/icon color) of the button.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- height → double?
-
The height of the button.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- loadingIndicatorColor → Color?
-
The color of the loading indicator.
final
- margin → EdgeInsetsGeometry?
-
The external margin around the button.
final
- onError → void Function(Object error)?
-
Callback invoked when an error occurs during processing.
final
- onFinishProcessing → VoidCallback?
-
Callback invoked when the button finishes processing.
final
-
onPressed
→ Future<
void> Function()? -
The callback that is called when the button is tapped.
final
- onStartProcessing → VoidCallback?
-
Callback invoked when the button starts processing.
final
- padding → EdgeInsetsGeometry?
-
The amount of space to surround the child inside the button.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- shadowColor → Color?
-
The shadow color of the button when elevation is applied.
final
- shape → OutlinedBorder?
-
The shape of the button's material.
final
- showLoadingIndicator → bool
-
Whether to show a loading indicator while processing.
final
- textStyle → TextStyle?
-
The text style for the button's label.
final
- type → SinglePressButtonType?
-
Determines the visual style of the button.
final
- width → double?
-
The width of the button.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< SinglePressButton> -
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