CupertinoButtonData class final
Cupertino-specific configuration for a platform button.
Maps to properties of CupertinoButton on iOS.
Constructors
-
CupertinoButtonData({bool isEnabled = true, VoidCallback? onPressed, VoidCallback? onLongPress, MouseCursor? mouseCursor, FocusNode? focusNode, bool autofocus = kDefaultAutofocus, Widget? child, Key? widgetKey, CupertinoButtonSize sizeStyle = kDefaultSizeStyle, EdgeInsetsGeometry? padding, Color? color, Color? foregroundColor, Color? disabledColor, Size? minimumSize, double? pressedOpacity = kDefaultPressedOpacity, BorderRadius? borderRadius, AlignmentGeometry? alignment = kDefaultAlignment, ValueChanged<
bool> ? onFocusChange, Color? focusColor}) -
Creates Cupertino-specific button configuration.
const
Properties
- alignment → AlignmentGeometry?
-
Alignment of the button content.
final
- autofocus → bool
-
Whether the button should automatically focus when it's first displayed.
finalinherited
- borderRadius → BorderRadius?
-
Border radius of the button.
final
- child → Widget?
-
The widget to display as the button's label.
finalinherited
- color → Color?
-
Background color of the button.
final
- disabledColor → Color?
-
Color of the button when disabled.
final
- focusColor → Color?
-
Color of the button when focused.
final
- focusNode → FocusNode?
-
The focus node for the button.
finalinherited
- foregroundColor → Color?
-
Foreground (text/icon) color of the button.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isEnabled → bool
-
Whether the button is enabled and can be pressed.
finalinherited
- minimumSize → Size?
-
Minimum size of the button.
final
- mouseCursor → MouseCursor?
-
The cursor to display when the mouse hovers over the button.
finalinherited
-
onFocusChange
→ ValueChanged<
bool> ? -
Callback when the focus state changes.
final
- onLongPress → VoidCallback?
-
Callback that is called when the button is long-pressed.
finalinherited
- onPressed → VoidCallback?
-
Callback that is called when the button is pressed.
finalinherited
- padding → EdgeInsetsGeometry?
-
Padding around the button content.
final
- pressedOpacity → double?
-
Opacity applied when the button is pressed.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sizeStyle → CupertinoButtonSize
-
The size style of the Cupertino button.
final
- widgetKey → Key?
-
Optional key for the button widget.
finalinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- kDefaultAlignment → const Alignment
- Default value for alignment.
- kDefaultPressedOpacity → const double
- Default value for pressedOpacity.
- kDefaultSizeStyle → const CupertinoButtonSize
- Default value for sizeStyle.