Начал экран успешного проведения покупки
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user