Initial draft
This commit is contained in:
20
lib/dto/address.dart
Normal file
20
lib/dto/address.dart
Normal file
@ -0,0 +1,20 @@
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
part 'address.g.dart';
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class AddressDTO {
|
||||
AddressDTO(
|
||||
{required this.streetName,
|
||||
required this.postalCode,
|
||||
required this.city});
|
||||
|
||||
String streetName;
|
||||
String postalCode;
|
||||
String city;
|
||||
|
||||
factory AddressDTO.fromJson(Map<String, dynamic> json) =>
|
||||
_$AddressDTOFromJson(json);
|
||||
|
||||
Map<dynamic, dynamic> toJson() => _$AddressDTOToJson(this);
|
||||
}
|
||||
Reference in New Issue
Block a user