copyWith method

  1. @override
IconSpec copyWith({
  1. Color? color,
  2. double? size,
  3. double? fill,
  4. TextDirection? textDirection,
  5. double? weight,
  6. double? grade,
  7. double? opticalSize,
  8. List<Shadow>? shadows,
  9. String? semanticLabel,
  10. bool? applyTextScaling,
  11. AnimatedData? animated,
})
override

Creates a copy of this spec with the given fields replaced by the non-null parameter values.

Implementation

@override
IconSpec copyWith({
  Color? color,
  double? size,
  double? fill,
  TextDirection? textDirection,
  double? weight,
  double? grade,
  double? opticalSize,
  List<Shadow>? shadows,
  String? semanticLabel,
  bool? applyTextScaling,
  AnimatedData? animated,
}) {
  return IconSpec(
    color: color ?? this.color,
    size: size ?? this.size,
    weight: weight ?? this.weight,
    grade: grade ?? this.grade,
    opticalSize: opticalSize ?? this.opticalSize,
    shadows: shadows ?? this.shadows,
    textDirection: textDirection ?? this.textDirection,
    applyTextScaling: applyTextScaling ?? this.applyTextScaling,
    fill: fill ?? this.fill,
    animated: animated ?? this.animated,
  );
}