withSize method
Creates a new Icon with the specified size, preserving the icon and color.
Example:
Icon originalIcon = Icon(Icons.home, color: Colors.blue);
Icon largerIcon = originalIcon.withSize(32.0); // Same icon and color, but size 32
Implementation
Icon withSize(double size) {
return Icon(icon, size: size, color: color);
}