copyWith method

JetleafProperty copyWith({
  1. String? key,
  2. Object? value,
  3. String? description,
})

Creates a copy of this property with the specified properties changed.

Base class for all Jetleaf framework configuration properties.

A JetleafProperty defines a typed configuration entry used within Jetleaf and related Jetleaf-based frameworks. Each property has:

  • A unique key used for lookup in the environment.
  • An optional value when the property is not set.
  • An optional description to document its purpose.

Properties are strongly typed using generics. For example:

const JetleafProperty serverPort = JetleafProperty("server.port", 8080, "The TCP port the server will bind to.");

Jetleaf also supports user-defined properties via JetleafProperty.custom.

Implementation

JetleafProperty copyWith({String? key, Object? value, String? description}) => _JetleafProperty(key ?? this.key, value ?? this.value, description ?? this.description);