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.
40 lines
1.2 KiB
Dart
40 lines
1.2 KiB
Dart
// To parse this JSON data, do
|
|
//
|
|
// final nearBrancheModel = nearBrancheModelFromJson(jsonString);
|
|
|
|
import 'dart:convert';
|
|
|
|
import 'branch_model.dart';
|
|
|
|
NearBrancheModel nearBrancheModelFromJson(String str) => NearBrancheModel.fromJson(json.decode(str));
|
|
|
|
String nearBrancheModelToJson(NearBrancheModel data) => json.encode(data.toJson());
|
|
|
|
class NearBrancheModel {
|
|
final int? messageStatus;
|
|
final int? totalItemsCount;
|
|
final List<BranchModel>? data;
|
|
final String? message;
|
|
|
|
NearBrancheModel({
|
|
this.messageStatus,
|
|
this.totalItemsCount,
|
|
this.data,
|
|
this.message,
|
|
});
|
|
|
|
factory NearBrancheModel.fromJson(Map<String, dynamic> json) => NearBrancheModel(
|
|
messageStatus: json["messageStatus"],
|
|
totalItemsCount: json["totalItemsCount"],
|
|
data: json["data"] == null ? [] : List<BranchModel>.from(json["data"]!.map((x) => BranchModel.fromJson(x))),
|
|
message: json["message"],
|
|
);
|
|
|
|
Map<String, dynamic> toJson() => {
|
|
"messageStatus": messageStatus,
|
|
"totalItemsCount": totalItemsCount,
|
|
"data": data == null ? [] : List<dynamic>.from(data!.map((x) => x.toJson())),
|
|
"message": message,
|
|
};
|
|
}
|