fix: some fixes in example app
This commit is contained in:
@@ -166,13 +166,14 @@ class GymHistoryItem {
|
||||
final String date;
|
||||
final String sum;
|
||||
final String photo;
|
||||
final String timestamp;
|
||||
|
||||
GymHistoryItem({
|
||||
required this.id,
|
||||
required this.date,
|
||||
required this.sum,
|
||||
required this.photo,
|
||||
});
|
||||
GymHistoryItem(
|
||||
{required this.id,
|
||||
required this.date,
|
||||
required this.sum,
|
||||
required this.photo,
|
||||
required this.timestamp});
|
||||
|
||||
factory GymHistoryItem.fromRawJson(String str) =>
|
||||
GymHistoryItem.fromJson(json.decode(str));
|
||||
@@ -184,12 +185,14 @@ class GymHistoryItem {
|
||||
date: json["date"],
|
||||
sum: json["sum"],
|
||||
photo: json["photo"],
|
||||
timestamp: json["timestamp"],
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
"id": id,
|
||||
"date": date,
|
||||
"sum": sum,
|
||||
"timestamp": timestamp,
|
||||
"photo": photo,
|
||||
};
|
||||
}
|
||||
@@ -201,19 +204,20 @@ class GymHistoryItemDetail {
|
||||
String? payUrl;
|
||||
final String receiver;
|
||||
final String email;
|
||||
final String timestamp;
|
||||
final String address;
|
||||
final List<GymHistoryItemDetailProvider> providers;
|
||||
|
||||
GymHistoryItemDetail({
|
||||
required this.id,
|
||||
required this.date,
|
||||
required this.sum,
|
||||
this.payUrl,
|
||||
required this.providers,
|
||||
required this.receiver,
|
||||
required this.email,
|
||||
required this.address,
|
||||
});
|
||||
GymHistoryItemDetail(
|
||||
{required this.id,
|
||||
required this.date,
|
||||
required this.sum,
|
||||
this.payUrl,
|
||||
required this.providers,
|
||||
required this.receiver,
|
||||
required this.email,
|
||||
required this.address,
|
||||
required this.timestamp});
|
||||
|
||||
factory GymHistoryItemDetail.fromRawJson(String str) =>
|
||||
GymHistoryItemDetail.fromJson(json.decode(str));
|
||||
@@ -222,16 +226,16 @@ class GymHistoryItemDetail {
|
||||
|
||||
factory GymHistoryItemDetail.fromJson(Map<String, dynamic> json) =>
|
||||
GymHistoryItemDetail(
|
||||
id: json["id"],
|
||||
date: json["date"],
|
||||
sum: json["sum"],
|
||||
receiver: json["receiver"],
|
||||
email: json["email"],
|
||||
address: json["address"],
|
||||
payUrl: json["pay_url"] as String?,
|
||||
providers: List<GymHistoryItemDetailProvider>.from(json["providers"]
|
||||
.map((x) => GymHistoryItemDetailProvider.fromJson(x))),
|
||||
);
|
||||
id: json["id"],
|
||||
date: json["date"],
|
||||
sum: json["sum"],
|
||||
receiver: json["receiver"],
|
||||
email: json["email"],
|
||||
address: json["address"],
|
||||
payUrl: json["pay_url"] as String?,
|
||||
providers: List<GymHistoryItemDetailProvider>.from(json["providers"]
|
||||
.map((x) => GymHistoryItemDetailProvider.fromJson(x))),
|
||||
timestamp: json["timestamp"]);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
"id": id,
|
||||
@@ -241,6 +245,7 @@ class GymHistoryItemDetail {
|
||||
"providers": List<dynamic>.from(providers.map((x) => x.toJson())),
|
||||
"receiver": receiver,
|
||||
"email": email,
|
||||
"timestamp": timestamp,
|
||||
"address": address,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user