add login
This commit is contained in:
7
lib/models/login_model.dart
Normal file
7
lib/models/login_model.dart
Normal file
@@ -0,0 +1,7 @@
|
||||
class LoginSigninModel {
|
||||
String email;
|
||||
String password;
|
||||
String name;
|
||||
|
||||
LoginSigninModel({this.email='test@test.at', this.password='123PassWd', this.name='TestUser'});
|
||||
}
|
||||
168
lib/models/ptv_logistic_model.dart
Normal file
168
lib/models/ptv_logistic_model.dart
Normal file
@@ -0,0 +1,168 @@
|
||||
|
||||
|
||||
|
||||
/// Hauptklasse für die PTV Location Response
|
||||
class PTVModel {
|
||||
List<Locations>? locations;
|
||||
String? noMatchFeedbackId;
|
||||
|
||||
PTVModel({this.locations, this.noMatchFeedbackId});
|
||||
|
||||
PTVModel.fromJson(Map<String, dynamic> json) {
|
||||
if (json['locations'] != null) {
|
||||
locations = <Locations>[];
|
||||
json['locations'].forEach((v) {
|
||||
locations!.add(Locations.fromJson(v));
|
||||
});
|
||||
}
|
||||
noMatchFeedbackId = json['noMatchFeedbackId'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = <String, dynamic>{};
|
||||
if (locations != null) {
|
||||
data['locations'] = locations!.map((v) => v.toJson()).toList();
|
||||
}
|
||||
data['noMatchFeedbackId'] = noMatchFeedbackId;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class Locations {
|
||||
ReferencePosition? referencePosition;
|
||||
Address? address;
|
||||
String? locationType;
|
||||
Quality? quality;
|
||||
String? formattedAddress;
|
||||
String? feedbackId;
|
||||
|
||||
Locations(
|
||||
{this.referencePosition,
|
||||
this.address,
|
||||
this.locationType,
|
||||
this.quality,
|
||||
this.formattedAddress,
|
||||
this.feedbackId});
|
||||
|
||||
Locations.fromJson(Map<String, dynamic> json) {
|
||||
referencePosition = json['referencePosition'] != null
|
||||
? ReferencePosition.fromJson(json['referencePosition'])
|
||||
: null;
|
||||
address =
|
||||
json['address'] != null ? Address.fromJson(json['address']) : null;
|
||||
locationType = json['locationType'];
|
||||
quality =
|
||||
json['quality'] != null ? Quality.fromJson(json['quality']) : null;
|
||||
formattedAddress = json['formattedAddress'];
|
||||
feedbackId = json['feedbackId'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = <String, dynamic>{};
|
||||
if (referencePosition != null) {
|
||||
data['referencePosition'] = referencePosition!.toJson();
|
||||
}
|
||||
if (address != null) {
|
||||
data['address'] = address!.toJson();
|
||||
}
|
||||
data['locationType'] = locationType;
|
||||
if (quality != null) {
|
||||
data['quality'] = quality!.toJson();
|
||||
}
|
||||
data['formattedAddress'] = formattedAddress;
|
||||
data['feedbackId'] = feedbackId;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class ReferencePosition {
|
||||
double? latitude;
|
||||
double? longitude;
|
||||
|
||||
ReferencePosition({this.latitude, this.longitude});
|
||||
|
||||
ReferencePosition.fromJson(Map<String, dynamic> json) {
|
||||
latitude = json['latitude'];
|
||||
longitude = json['longitude'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = <String, dynamic>{};
|
||||
data['latitude'] = latitude;
|
||||
data['longitude'] = longitude;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class Address {
|
||||
String? countryName;
|
||||
String? state;
|
||||
String? province;
|
||||
String? city;
|
||||
String? district;
|
||||
String? subdistrict;
|
||||
String? street;
|
||||
String? houseNumber;
|
||||
String? countryCodeIsoAlpha2;
|
||||
String? countryCodeIsoAlpha3;
|
||||
String? countryCode;
|
||||
|
||||
Address(
|
||||
{this.countryName,
|
||||
this.state,
|
||||
this.province,
|
||||
this.city,
|
||||
this.district,
|
||||
this.subdistrict,
|
||||
this.street,
|
||||
this.houseNumber,
|
||||
this.countryCodeIsoAlpha2,
|
||||
this.countryCodeIsoAlpha3,
|
||||
this.countryCode});
|
||||
|
||||
Address.fromJson(Map<String, dynamic> json) {
|
||||
countryName = json['countryName'];
|
||||
state = json['state'];
|
||||
province = json['province'];
|
||||
city = json['city'];
|
||||
district = json['district'];
|
||||
subdistrict = json['subdistrict'];
|
||||
street = json['street'];
|
||||
houseNumber = json['houseNumber'];
|
||||
countryCodeIsoAlpha2 = json['countryCodeIsoAlpha2'];
|
||||
countryCodeIsoAlpha3 = json['countryCodeIsoAlpha3'];
|
||||
countryCode = json['countryCode'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = <String, dynamic>{};
|
||||
data['countryName'] = countryName;
|
||||
data['state'] = state;
|
||||
data['province'] = province;
|
||||
data['city'] = city;
|
||||
data['district'] = district;
|
||||
data['subdistrict'] = subdistrict;
|
||||
data['street'] = street;
|
||||
data['houseNumber'] = houseNumber;
|
||||
data['countryCodeIsoAlpha2'] = countryCodeIsoAlpha2;
|
||||
data['countryCodeIsoAlpha3'] = countryCodeIsoAlpha3;
|
||||
data['countryCode'] = countryCode;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class Quality {
|
||||
int? distance;
|
||||
|
||||
Quality({this.distance});
|
||||
|
||||
Quality.fromJson(Map<String, dynamic> json) {
|
||||
distance = json['distance'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = <String, dynamic>{};
|
||||
data['distance'] = distance;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user