copyWith method
Returns a copy with the given fields replaced. For a nullable
field pass a function, e.g. field: () => null to clear it.
Implementation
@override
PageBlockDetails copyWith({
RichText? header,
List<PageBlock>? blocks,
bool? isOpen,
}) => PageBlockDetails(
header: header ?? this.header,
blocks: blocks ?? this.blocks,
isOpen: isOpen ?? this.isOpen,
);