checkIsProduction method
Implementation
Future<bool> checkIsProduction() async {
if (kIsWeb) {
production = true;
return false;
}
try {
var response = await _requestVersion();
int statusCode = response.statusCode ?? 0;
if (statusCode >= 200 && statusCode <= 300) {
var data = response.data[_app.info.version];
production = (data["exists"] && data["activated"]);
return production;
}
return false;
} catch (e) {
Logger.error(e, "PurchaseService", "checkProduction");
return false;
}
}