CNButton.icon constructor

const CNButton.icon({
  1. Key? key,
  2. required CNIcon? icon,
  3. VoidCallback? onPressed,
  4. bool enabled = true,
  5. Color? tint,
  6. CNButtonTheme theme = const CNButtonTheme(),
  7. CNButtonConfig config = const CNButtonConfig(style: CNButtonStyle.glass),
})

Creates a round, icon-only variant of CNButton.

When padding, width, and minHeight are not provided in config, the button will be automatically sized to be circular based on the icon size.

icon must be provided.

Implementation

const CNButton.icon({
  super.key,
  required this.icon,
  this.onPressed,
  this.enabled = true,
  this.tint,
  this.theme = const CNButtonTheme(),
  this.config = const CNButtonConfig(style: CNButtonStyle.glass),
}) : label = null,
     super();