copyWith method

AddressComponent copyWith({
  1. String? longText,
  2. String? shortText,
  3. List<PlaceType>? types,
  4. String? languageCode,
})

Implementation

AddressComponent copyWith({
  String? longText,
  String? shortText,
  List<PlaceType>? types,
  String? languageCode,
}) {
  return AddressComponent(
    longText: longText ?? this.longText,
    shortText: shortText ?? this.shortText,
    types: ((types?.isNotEmpty ?? false) ? types : null) ?? this.types,
    languageCode: languageCode ?? this.languageCode,
  );
}