You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
654 B
30 lines
654 B
7 months ago
|
// To parse this JSON data, do
|
||
|
//
|
||
|
// final address = addressFromJson(jsonString);
|
||
|
|
||
|
import 'dart:convert';
|
||
|
|
||
|
Address addressFromJson(String str) => Address.fromJson(json.decode(str));
|
||
|
|
||
|
String addressToJson(Address data) => json.encode(data.toJson());
|
||
|
|
||
|
class Address {
|
||
|
String streetName;
|
||
|
String comments;
|
||
|
|
||
|
Address({
|
||
|
required this.streetName,
|
||
|
required this.comments,
|
||
|
});
|
||
|
|
||
|
factory Address.fromJson(Map<String, dynamic> json) => Address(
|
||
|
streetName: json["street_name"],
|
||
|
comments: json["comments"],
|
||
|
);
|
||
|
|
||
|
Map<String, dynamic> toJson() => {
|
||
|
"street_name": streetName,
|
||
|
"comments": comments,
|
||
|
};
|
||
|
}
|