NotificationActionButton constructor

NotificationActionButton({
  1. required String key,
  2. required String label,
  3. String? icon,
  4. bool enabled = true,
  5. bool requireInputText = false,
  6. bool autoDismissible = true,
  7. bool showInCompactView = false,
  8. bool isDangerousOption = false,
  9. bool isAuthenticationRequired = false,
  10. Color? color,
  11. ActionType actionType = ActionType.Default,
})

Constructs a NotificationActionButton.

key: Unique key identifier for the action button. label: Text label for the action button. icon: Icon resource for the action button. enabled: Indicates if the button is enabled. requireInputText: Requires input text when the button is pressed. autoDismissible: Automatically dismisses the notification when the button is pressed. showInCompactView: Shows the button in the compact view of the notification. isDangerousOption: Marks the button as representing a dangerous choice. color: Color of the button. actionType: Type of action associated with the button.

Implementation

NotificationActionButton(
    {required String key,
    required String label,
    String? icon,
    bool enabled = true,
    bool requireInputText = false,
    bool autoDismissible = true,
    bool showInCompactView = false,
    bool isDangerousOption = false,
    bool isAuthenticationRequired = false,
    Color? color,
    ActionType actionType = ActionType.Default})
    : _key = key,
      _label = label,
      _icon = icon,
      _enabled = enabled,
      _requireInputText = requireInputText,
      _autoDismissible = autoDismissible,
      _showInCompactView = showInCompactView,
      _isDangerousOption = isDangerousOption,
      _isAuthenticationRequired = isAuthenticationRequired,
      _color = color,
      _actionType = actionType {
  // Adapting input type to 0.7.0 pattern
  adaptInputFieldToRequireText();
}