OudsButton.small constructor
- Key? key,
- String? label,
- String? icon,
- VoidCallback? onPressed,
- Loader? loader,
- bool? isLoading = false,
- required OudsButtonAppearance appearance,
- String? package,
- bool? isFullWidth = false,
Creates an OudsButton with OudsButtonSize.small, for contexts where space is constrained.
This size can be particularly useful in an information-dense interface or in the construction of a template or component requiring the use of small elements (in a "List item" component, for example). The default size is available via OudsButton.
OudsButton.small(
label: 'Button',
appearance: OudsButtonAppearance.defaultAppearance,
onPressed: () {
// Handle button tap.
},
);
Implementation
const OudsButton.small({
super.key,
this.label,
this.icon,
this.onPressed,
this.loader,
this.isLoading = false,
required this.appearance,
this.package,
this.isFullWidth = false,
}) : _size = OudsButtonSize.small,
_component = OudsButtonComponent.defaultButton,
_navigationLayout = null,
_semanticsLabel = null;