Начал экран успешного проведения покупки

This commit is contained in:
kifio
2017-07-24 08:48:51 +03:00
parent 3f7dc05d9e
commit 8dcae4c256
8 changed files with 240 additions and 98 deletions

View File

@@ -62,18 +62,7 @@ startScanner(BuildContext context) async {
platform.setMethodCallHandler((MethodCall call) async {
if (call.method == 'foo') {
String url = intUrl + 'tokens/' + token + '?_dmapptoken=' + intToken;
httpClient.delete(url).then((response) {
print(response.body);
}).catchError((error) {
print(error.toString());
});
pushRoute(context, new RegistrationScreen());
logout();
} else {
pushRoute(context, new PurchaseScreen());
}
@@ -85,6 +74,19 @@ startScanner(BuildContext context) async {
await platform.invokeMethod('startScanner');
}
logout(BuildContext context) {
// String url = intUrl + 'tokens/' + token + '?_dmapptoken=' + intToken;
// httpClient.delete(url).then((response) {
// print(response.body);
// }).catchError((error) {
// print(error.toString());
// });
pushRoute(context, new RegistrationScreen());
}
/// Навигация по приложению.
/// widget - следующий экран приложения.
pushRoute(BuildContext context, Widget widget) {