Initial draft
This commit is contained in:
24
lib/model/address.dart
Normal file
24
lib/model/address.dart
Normal file
@ -0,0 +1,24 @@
|
||||
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";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user