copyWith method

LiquidConfig copyWith({
  1. String? tagStart,
  2. String? tagEnd,
  3. String? varStart,
  4. String? varEnd,
  5. String? stripMarker,
})

Creates a copy of this config with the specified fields replaced.

final custom = LiquidConfig.standard.copyWith(
  tagStart: '<%',
  tagEnd: '%>',
);
// custom uses <% %> for tags but {{ }} for variables

Implementation

LiquidConfig copyWith({
  String? tagStart,
  String? tagEnd,
  String? varStart,
  String? varEnd,
  String? stripMarker,
}) {
  return LiquidConfig(
    tagStart: tagStart ?? this.tagStart,
    tagEnd: tagEnd ?? this.tagEnd,
    varStart: varStart ?? this.varStart,
    varEnd: varEnd ?? this.varEnd,
    stripMarker: stripMarker ?? this.stripMarker,
  );
}