copyWith method

  1. @override
RichTextAnchorLink copyWith({
  1. RichText? text,
  2. String? anchorName,
  3. String? url,
})
override

Returns a copy with the given fields replaced. For a nullable field pass a function, e.g. field: () => null to clear it.

Implementation

@override
RichTextAnchorLink copyWith({
  RichText? text,
  String? anchorName,
  String? url,
}) =>
    RichTextAnchorLink(
      text: text ?? this.text,
      anchorName: anchorName ?? this.anchorName,
      url: url ?? this.url,
    );