copyWith method

LogConfig copyWith({
  1. int? methodCount,
  2. int? lineLength,
  3. bool? printTitle,
  4. AnsiColor? color,
  5. bool? autoWrap,
  6. List<String>? excludePaths,
})

克隆新的日志配置

Implementation

LogConfig copyWith({
  int? methodCount,
  int? lineLength,
  bool? printTitle,
  AnsiColor? color,
  bool? autoWrap,
  List<String>? excludePaths,
}) {
  return LogConfig(
    methodCount: methodCount ?? this.methodCount,
    lineLength: lineLength ?? this.lineLength,
    printTitle: printTitle ?? this.printTitle,
    color: color ?? this.color,
    autoWrap: autoWrap ?? this.autoWrap,
    excludePaths: excludePaths == null
        ? this.excludePaths
        : [...this.excludePaths!, ...excludePaths],
  );
}