forked from eatvio/eatvio_app
fix(diary): added proccesing of future dates and fixed deleted portions
This commit is contained in:
@@ -1,13 +1,14 @@
|
||||
import 'dart:developer';
|
||||
|
||||
import 'package:eatvio_app/features/order_info/presentation/info_by_order_screen.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:webview_flutter/webview_flutter.dart';
|
||||
|
||||
class PaymentScreen extends StatefulWidget {
|
||||
static const name = 'paymentScreen';
|
||||
static const path = '/payment-screen';
|
||||
final String url;
|
||||
const PaymentScreen({super.key, required this.url});
|
||||
final int planId;
|
||||
const PaymentScreen({super.key, required this.url, required this.planId});
|
||||
|
||||
@override
|
||||
State<PaymentScreen> createState() => _PaymentScreenState();
|
||||
@@ -23,13 +24,14 @@ class _PaymentScreenState extends State<PaymentScreen> {
|
||||
..setJavaScriptMode(JavaScriptMode.unrestricted)
|
||||
..setNavigationDelegate(
|
||||
NavigationDelegate(
|
||||
onProgress: (int progress) {},
|
||||
onPageStarted: (String url) {},
|
||||
onPageFinished: (String url) {},
|
||||
onHttpError: (HttpResponseError error) {},
|
||||
onWebResourceError: (WebResourceError error) {},
|
||||
onNavigationRequest: (NavigationRequest request) {
|
||||
log(request.url);
|
||||
if (request.url.contains('tbank/checkout-success')) {
|
||||
if (request.url.contains('Success=true')) {
|
||||
GoRouter.of(context).pushReplacement(InfoByOrderScreen.path, extra: {'planId': widget.planId, 'successfulPayment': true});
|
||||
} else {
|
||||
GoRouter.of(context).pushReplacement(InfoByOrderScreen.path, extra: {'planId': widget.planId, 'successfulPayment': false});
|
||||
}
|
||||
}
|
||||
return NavigationDecision.navigate;
|
||||
},
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user