Skip to content

Commit 24dc46b

Browse files
committed
fix changes
1 parent cc06b18 commit 24dc46b

File tree

5 files changed

+10
-399
lines changed

5 files changed

+10
-399
lines changed

lib/models/links.dart

Lines changed: 0 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -13,58 +13,3 @@
1313
// IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
1414
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
1515

16-
import 'package:woosignal/models/collection.dart';
17-
import 'package:woosignal/models/self.dart';
18-
19-
class Links {
20-
List<Self>? self;
21-
List<Collection>? collection;
22-
List<Collection>? up;
23-
List<Collection>? describes;
24-
25-
Links({this.self, this.collection, this.up});
26-
27-
Links.fromJson(Map<String, dynamic> json) {
28-
if (json['self'] != null) {
29-
self = [];
30-
json['self'].forEach((v) {
31-
self!.add(Self.fromJson(v));
32-
});
33-
}
34-
if (json['collection'] != null) {
35-
collection = [];
36-
json['collection'].forEach((v) {
37-
collection!.add(Collection.fromJson(v));
38-
});
39-
}
40-
if (json['up'] != null) {
41-
up = [];
42-
json['up'].forEach((v) {
43-
up!.add(Collection.fromJson(v));
44-
});
45-
}
46-
if (json['describes'] != null) {
47-
describes = [];
48-
json['describes'].forEach((v) {
49-
describes!.add(Collection.fromJson(v));
50-
});
51-
}
52-
}
53-
54-
Map<String, dynamic> toJson() {
55-
final Map<String, dynamic> data = <String, dynamic>{};
56-
if (self != null) {
57-
data['self'] = self!.map((v) => v.toJson()).toList();
58-
}
59-
if (collection != null) {
60-
data['collection'] = collection!.map((v) => v.toJson()).toList();
61-
}
62-
if (up != null) {
63-
data['up'] = up!.map((v) => v.toJson()).toList();
64-
}
65-
if (describes != null) {
66-
data['describes'] = describes!.map((v) => v.toJson()).toList();
67-
}
68-
return data;
69-
}
70-
}

lib/models/response/product.dart

Lines changed: 0 additions & 302 deletions
This file was deleted.

lib/models/response/ProductsListModel.dart renamed to lib/models/response/products_response.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
class ProductsListModel {
1+
class ProductsResponse {
22
List<Products>? products;
33

4-
ProductsListModel({this.products});
4+
ProductsResponse({this.products});
55

6-
ProductsListModel.fromJson(Map<String, dynamic> json) {
6+
ProductsResponse.fromJson(Map<String, dynamic> json) {
77
if (json['products'] != null) {
88
products = <Products>[];
99
json['products'].forEach((v) {
@@ -31,7 +31,7 @@ class Products {
3131
String? handle;
3232
String? updatedAt;
3333
String? publishedAt;
34-
Null? templateSuffix;
34+
String? templateSuffix;
3535
String? status;
3636
String? publishedScope;
3737
String? tags;

0 commit comments

Comments
 (0)