copyWith method
Creates a copy of this spec with the given fields replaced by the non-null parameter values.
Implementation
@override
// ignore: avoid-incomplete-copy-with
TranslateModifier copyWith({double? x, double? y, Alignment? alignment}) {
final matrix = Matrix4.translationValues(x ?? 0.0, y ?? 0.0, 0.0);
return TranslateModifier._(
transform: x != null || y != null ? matrix : transform,
alignment: alignment ?? this.alignment,
);
}