copyWith method

ReposConfig copyWith({
  1. Map<String, PackageCheckoutConfig>? sources,
  2. String? checkoutRoot,
  3. CheckoutMode? defaultMode,
  4. String? defaultRef,
  5. String? defaultBase,
})

Implementation

ReposConfig copyWith({
  Map<String, PackageCheckoutConfig>? sources,
  String? checkoutRoot,
  CheckoutMode? defaultMode,
  String? defaultRef,
  String? defaultBase,
}) {
  return ReposConfig(
    sources: {
      ...this.sources,
      ...?sources,
    },
    checkoutRoot: checkoutRoot ?? this.checkoutRoot,
    defaultRef: defaultRef ?? this.defaultRef,
    defaultBase: defaultBase ?? this.defaultBase,
    defaultMode: defaultMode ?? this.defaultMode,
  );
}