25 lines
490 B
Dart
25 lines
490 B
Dart
import 'package:hl_lieferservice/dto/address.dart';
|
|
|
|
class Address {
|
|
const Address(
|
|
{required this.street,
|
|
required this.city,
|
|
required this.postalCode});
|
|
|
|
final String street;
|
|
final String postalCode;
|
|
final String city;
|
|
|
|
factory Address.fromDTO(AddressDTO dto) {
|
|
return Address(
|
|
street: dto.streetName,
|
|
city: dto.city,
|
|
postalCode: dto.postalCode);
|
|
}
|
|
|
|
@override
|
|
String toString() {
|
|
return "$street $postalCode $city";
|
|
}
|
|
}
|