WT1.1.5 In-app-purchase
This commit is contained in:
@@ -5,7 +5,7 @@ import 'package:aitrainer_app/model/exercise_plan_detail.dart';
|
||||
import 'package:aitrainer_app/model/exercise_tree.dart';
|
||||
import 'package:aitrainer_app/model/exercise.dart';
|
||||
import 'package:aitrainer_app/model/model_change.dart';
|
||||
import 'package:aitrainer_app/model/product.dart';
|
||||
import 'package:aitrainer_app/model/product.dart' as wt_product;
|
||||
import 'package:aitrainer_app/model/product_test.dart';
|
||||
import 'package:aitrainer_app/model/property.dart';
|
||||
import 'package:aitrainer_app/model/purchase.dart';
|
||||
@@ -84,7 +84,7 @@ class Cache with Logging {
|
||||
List<Exercise> _exercises;
|
||||
ExercisePlan _myExercisePlan;
|
||||
List<Property> _properties;
|
||||
List<Product> _products;
|
||||
List<wt_product.Product> _products;
|
||||
List<Purchase> _purchases = List();
|
||||
List<ProductTest> _productTests;
|
||||
|
||||
@@ -405,18 +405,18 @@ class Cache with Logging {
|
||||
setBadge("Sizes", true);
|
||||
setBadge("BMI", true);
|
||||
setBadge("BMR", true);
|
||||
setBadgeNr("Body Compositions", 3);
|
||||
setBadgeNr("My Body", 3);
|
||||
setBadgeNr("home", 3);
|
||||
} else if (customerRepository.getWeight() == 0) {
|
||||
setBadge("BMI", true);
|
||||
setBadge("BMR", true);
|
||||
setBadge("Body Compositions", true);
|
||||
setBadge("My Body", true);
|
||||
setBadgeNr("home", 1);
|
||||
}
|
||||
if (customerRepository.getHeight() == 0) {
|
||||
setBadge("BMI", true);
|
||||
setBadge("BMR", true);
|
||||
setBadge("Body Compositions", true);
|
||||
setBadge("My Body", true);
|
||||
setBadgeNr("home", 1);
|
||||
}
|
||||
}
|
||||
@@ -450,7 +450,7 @@ class Cache with Logging {
|
||||
await customerRepository.getPurchase();
|
||||
await customerRepository.getProductTests();
|
||||
|
||||
this.hasPurchased = this._purchases.isNotEmpty;
|
||||
//this.hasPurchased = this._purchases.isNotEmpty;
|
||||
Cache().startPage = "home";
|
||||
}
|
||||
|
||||
|
||||
@@ -55,7 +55,6 @@ class ExerciseType {
|
||||
this.parents.add(parent['exerciseTreeId']);
|
||||
});
|
||||
}
|
||||
;
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
|
||||
@@ -9,6 +9,8 @@ class Purchase {
|
||||
double purchaseSum;
|
||||
String currency;
|
||||
|
||||
Purchase({this.customerId, this.productId});
|
||||
|
||||
Purchase.fromJson(Map json) {
|
||||
this.purchaseId = json['purchaseId'];
|
||||
this.customerId = json['customerId'];
|
||||
|
||||
Reference in New Issue
Block a user