TIcon constructor

const TIcon({
  1. Key? key,
  2. required IconData icon,
  3. double? width,
  4. double? height,
  5. double? size,
  6. VoidCallback? onPressed,
  7. Color? color,
  8. Color? backgroundColor,
  9. String? tooltip,
  10. double borderRadius = 100.0,
})

A custom icon button widget with configurable shape and background color.

  • icon is the required icon to display.
  • width and height define the size of the container.
  • size specifies the size of the icon inside the container (default: 18.0).
  • color sets the color of the icon.
  • backgroundColor sets the background color of the container.
  • onPressed defines the callback when the icon is pressed.
  • borderRadius allows custom shaping of the container (default: circular).

Implementation

const TIcon({
  super.key,
  required this.icon,
  this.width,
  this.height,
  this.size,
  this.onPressed,
  this.color,
  this.backgroundColor,
  this.tooltip,
  this.borderRadius = 100.0,
});