OudsTopBarActionConfig.icon constructor
- required String icon,
- VoidCallback? onActionPressed,
- String? contentDescription,
- OudsTopAppBarActionBadge? badge,
Creates a configuration for an icon-based action.
The badge parameter is only applied on Material and will be ignored on iOS.
Implementation
factory OudsTopBarActionConfig.icon({
required String icon, // Make this non-nullable for clarity
VoidCallback? onActionPressed,
String? contentDescription,
OudsTopAppBarActionBadge? badge, // Material-only
}) {
return OudsTopBarActionConfig._(
type: OudsTopBarActionType.icon,
icon: icon,
onActionPressed: onActionPressed,
contentDescription: contentDescription,
badge: badge,
);
}