copyWith method
📋 Return an Icon with fields that mirror this
except for the parameters given with this method.
Implementation
Icon copyWith({
Key? key,
IconData? icon,
double? size,
Color? color,
String? semanticLabel,
TextDirection? textDirection,
}) =>
Icon(
icon ?? this.icon,
key: key ?? this.key, // should ignore this.key?
size: size ?? this.size,
color: color ?? this.color,
semanticLabel: semanticLabel ?? this.semanticLabel,
textDirection: textDirection ?? this.textDirection,
);