icon property

Widget? icon
final

Takes Widget as an Icon and can be used alone as IconButton.

Example

GenZButton(
  onPressed: () {},
  icon: const Icon(Icons.favorite),
  type: GenZButtonType.TRANSPARENT,
)

Implementation

final Widget? icon;