DialogButton class

A utility class representing positive and negative buttons for a dialog.

Constructors

DialogButton({required BuildContext context, Key? positiveButtonKey, Key? negativeButtonKey, String? positiveButtonName, Color? positiveButtonBackgroundColor, TextStyle? positiveButtonStyle, Widget? positiveButtonWidget, String? negativeButtonName, Color? negativeButtonBackgroundColor, TextStyle? negativeButtonStyle, Widget? negativeButtonWidget, dynamic onPositiveButtonPressed()?, dynamic onNegativeButtonPressed()?})
Creates a DialogButton instance with the specified parameters.

Properties

context BuildContext
The build context for which the buttons are created.
final
hashCode int
The hash code for this object.
no setterinherited
negativeButton Widget?
The (optional) widget for the negative button.
no setter
negativeButtonBackgroundColor Color?
The background color for the negative button.
final
negativeButtonKey Key?
final
negativeButtonName String?
The (optional) name or label for the negative button.
final
negativeButtonStyle TextStyle?
The style for the negative button text.
final
negativeButtonWidget Widget?
The (optional) custom widget for the negative button.
final
onNegativeButtonPressed ↔ dynamic Function()?
A callback function to be executed when the negative button is pressed.
getter/setter pair
onPositiveButtonPressed ↔ dynamic Function()?
A callback function to be executed when the positive button is pressed.
getter/setter pair
positiveButton Widget?
The (optional) widget for the positive button.
no setter
positiveButtonBackgroundColor Color?
The background color for the positive button.
final
positiveButtonKey Key?
final
positiveButtonName String?
The (optional) name or label for the positive button.
final
positiveButtonStyle TextStyle?
The style for the positive button text.
final
positiveButtonWidget Widget?
The (optional) custom widget for the positive button.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

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