CNButtonData.icon constructor

const CNButtonData.icon({
  1. CNIcon? icon,
  2. VoidCallback? onPressed,
  3. bool enabled = true,
  4. CNButtonTheme theme = const CNButtonTheme(),
  5. CNButtonDataConfig config = const CNButtonDataConfig(),
})

Creates an icon-only button data model.

Implementation

const CNButtonData.icon({
  this.icon,
  this.onPressed,
  this.enabled = true,
  this.theme = const CNButtonTheme(),
  this.config = const CNButtonDataConfig(),
}) : label = null,
     isIcon = true;