You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
86 lines
2.0 KiB
Dart
86 lines
2.0 KiB
Dart
// To parse this JSON data, do
|
|
//
|
|
// final branch = branchFromJson(jsonString);
|
|
|
|
import 'dart:convert';
|
|
|
|
Branch branchFromJson(String str) => Branch.fromJson(json.decode(str));
|
|
|
|
String branchToJson(Branch data) => json.encode(data.toJson());
|
|
|
|
class Branch {
|
|
Branch({
|
|
this.totalItemsCount,
|
|
this.data,
|
|
this.messageStatus,
|
|
this.message,
|
|
});
|
|
|
|
int? totalItemsCount;
|
|
List<BranchData>? data;
|
|
int? messageStatus;
|
|
String? message;
|
|
|
|
factory Branch.fromJson(Map<String, dynamic> json) => Branch(
|
|
totalItemsCount: json["totalItemsCount"],
|
|
data: json["data"] == null ? null : List<BranchData>.from(json["data"].map((x) => BranchData.fromJson(x))),
|
|
messageStatus: json["messageStatus"],
|
|
message: json["message"],
|
|
);
|
|
|
|
Map<String, dynamic> toJson() => {
|
|
"totalItemsCount": totalItemsCount,
|
|
"data": data == null ? null : List<dynamic>.from(data!.map((x) => x.toJson())),
|
|
"messageStatus": messageStatus,
|
|
"message": message,
|
|
};
|
|
}
|
|
|
|
class BranchData {
|
|
BranchData({
|
|
this.id,
|
|
this.serviceProviderId,
|
|
this.branchName,
|
|
this.branchDescription,
|
|
this.cityId,
|
|
this.address,
|
|
this.latitude,
|
|
this.longitude,
|
|
this.status,
|
|
});
|
|
|
|
int? id;
|
|
int? serviceProviderId;
|
|
String? branchName;
|
|
String? branchDescription;
|
|
int? cityId;
|
|
String? address;
|
|
String? latitude;
|
|
String? longitude;
|
|
int? status;
|
|
|
|
factory BranchData.fromJson(Map<String, dynamic> json) => BranchData(
|
|
id: json["id"],
|
|
serviceProviderId: json["serviceProviderID"],
|
|
branchName: json["branchName"],
|
|
branchDescription: json["branchDescription"],
|
|
cityId: json["cityID"],
|
|
address: json["address"],
|
|
latitude: json["latitude"],
|
|
longitude: json["longitude"],
|
|
status: json["status"],
|
|
);
|
|
|
|
Map<String, dynamic> toJson() => {
|
|
"id": id,
|
|
"serviceProviderID": serviceProviderId,
|
|
"branchName": branchName,
|
|
"branchDescription": branchDescription,
|
|
"cityID": cityId,
|
|
"address": address,
|
|
"latitude": latitude,
|
|
"longitude": longitude,
|
|
"status": status,
|
|
};
|
|
}
|