EasyElevatedButton constructor

const EasyElevatedButton({
  1. Key? key,
  2. required String label,
  3. required VoidCallback onPressed,
  4. bool enabled = true,
  5. Color? labelColor,
  6. TextStyle? labelStyle,
  7. double? height,
  8. double? width,
  9. Color? color,
  10. Widget? icon,
  11. bool isTrailingIcon = false,
  12. double? borderRadius,
  13. bool isRounded = false,
  14. EdgeInsetsGeometry? margin,
  15. double? elevation,
  16. bool haptics = false,
})

EasyElevatedButton is a ElevatedButton with simple parameters which makes it easy to style this button.

Similar to a ElevatedButton.icon button, adding an icon is also possible in this button with some extra configurations.

EasyElevatedButton(
 label: 'Hello World!',
 onPressed: () {},
)

Implementation

const EasyElevatedButton({
  Key? key,
  required this.label,
  required this.onPressed,
  this.enabled = true,
  this.labelColor,
  this.labelStyle,
  this.height,
  this.width,
  this.color,
  this.icon,
  this.isTrailingIcon = false,
  this.borderRadius,
  this.isRounded = false,
  this.margin,
  this.elevation,
  this.haptics = false,
}) : super(key: key);