copyWith method

  1. @override
PageBlockDetails copyWith({
  1. RichText? header,
  2. List<PageBlock>? blocks,
  3. bool? isOpen,
})
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
PageBlockDetails copyWith({
  RichText? header,
  List<PageBlock>? blocks,
  bool? isOpen,
}) => PageBlockDetails(
  header: header ?? this.header,
  blocks: blocks ?? this.blocks,
  isOpen: isOpen ?? this.isOpen,
);