Bladeren bron

Fix parsing

vishnukvmd 2 jaren geleden
bovenliggende
commit
b3913cefa4
1 gewijzigde bestanden met toevoegingen van 5 en 3 verwijderingen
  1. 5 3
      lib/models/subscription.dart

+ 5 - 3
lib/models/subscription.dart

@@ -45,7 +45,7 @@ class Subscription {
       price: map['price'],
       price: map['price'],
       period: map['period'],
       period: map['period'],
       attributes: map["attributes"] != null
       attributes: map["attributes"] != null
-          ? Attributes.fromJson(map["attributes"])
+          ? Attributes.fromMap(map["attributes"])
           : null,
           : null,
     );
     );
   }
   }
@@ -65,7 +65,8 @@ class Subscription {
 
 
   String toJson() => json.encode(toMap());
   String toJson() => json.encode(toMap());
 
 
-  factory Subscription.fromJson(String source) => Subscription.fromMap(json.decode(source));
+  factory Subscription.fromJson(String source) =>
+      Subscription.fromMap(json.decode(source));
 }
 }
 
 
 class Attributes {
 class Attributes {
@@ -93,5 +94,6 @@ class Attributes {
 
 
   String toJson() => json.encode(toMap());
   String toJson() => json.encode(toMap());
 
 
-  factory Attributes.fromJson(String source) => Attributes.fromMap(json.decode(source));
+  factory Attributes.fromJson(String source) =>
+      Attributes.fromMap(json.decode(source));
 }
 }