OudsButton.small constructor

const OudsButton.small({
  1. Key? key,
  2. String? label,
  3. String? icon,
  4. VoidCallback? onPressed,
  5. Loader? loader,
  6. bool? isLoading = false,
  7. required OudsButtonAppearance appearance,
  8. String? package,
  9. 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;