copyWith method

DetectedLanguage copyWith({
  1. String? name,
  2. String? code,
  3. double? confidence,
})

Copies the object with the specified values changed.

Implementation

DetectedLanguage copyWith({
  String? name,
  String? code,
  double? confidence,
}) {
  return DetectedLanguage(
    name: name ?? this.name,
    code: code ?? this.code,
    confidence: confidence ?? this.confidence,
  );
}