copyWith method

JsonFormattingOptions copyWith({
  1. JsonIndentationSize? indentationSize,
  2. int? indentationSizeInt,
  3. int? colonPadding,
})

Build a new JsonFormattingOptions instance by using an existing JsonFormattingOptions instance as base.

Can be easily combined with standardJsonFormatting as base.

Implementation

JsonFormattingOptions copyWith({
  JsonIndentationSize? indentationSize,
  int? indentationSizeInt,
  int? colonPadding,
}) =>
    JsonFormattingOptions(
      indentation:
          indentationSize?.length ?? indentationSizeInt ?? indentation,
      colonPadding: colonPadding ?? this.colonPadding,
    );