copyWith method

PageBlockCaption copyWith({
  1. RichText? text,
  2. RichText? credit,
})

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

Implementation

PageBlockCaption copyWith({
  RichText? text,
  RichText? credit,
}) =>
    PageBlockCaption(
      text: text ?? this.text,
      credit: credit ?? this.credit,
    );