FancyIcon constructor

const FancyIcon({
  1. Key? key,
  2. required IconData icon,
  3. double? size,
  4. Color? color,
})

Creates a new FancyIcon instance.

The icon parameter specifies the IconData to display, which is required. Optionally, provide size to override the default icon size or color to set a custom icon color. If color is null, it defaults to the foreground color from the current ArcaneTheme. The key is passed to the superclass for widget identification.

This constructor is const-enabled, allowing efficient reuse in widget builds.

Implementation

const FancyIcon({super.key, required this.icon, this.size, this.color});