BASE: Update Icons & Name Of The App.
This commit is contained in:
@@ -3,7 +3,7 @@ import 'dart:async';
|
||||
import 'package:customer/constant/constant.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:get/get.dart' hide Trans;
|
||||
import 'package:webview_flutter/webview_flutter.dart';
|
||||
|
||||
class MercadoPagoScreen extends StatefulWidget {
|
||||
@@ -36,10 +36,17 @@ class _MercadoPagoScreenState extends State<MercadoPagoScreen> {
|
||||
onWebResourceError: (WebResourceError error) {},
|
||||
onNavigationRequest: (NavigationRequest navigation) async {
|
||||
debugPrint("--->2 ${navigation.url}");
|
||||
if (navigation.url.contains("${Constant.globalUrl}payment/success")) {
|
||||
if (navigation.url.contains(
|
||||
"${Constant.globalUrl}payment/success",
|
||||
)) {
|
||||
Get.back(result: true);
|
||||
}
|
||||
if (navigation.url.contains("${Constant.globalUrl}payment/failure") || navigation.url.contains("${Constant.globalUrl}payment/pending")) {
|
||||
if (navigation.url.contains(
|
||||
"${Constant.globalUrl}payment/failure",
|
||||
) ||
|
||||
navigation.url.contains(
|
||||
"${Constant.globalUrl}payment/pending",
|
||||
)) {
|
||||
Get.back(result: false);
|
||||
}
|
||||
return NavigationDecision.navigate;
|
||||
@@ -82,14 +89,20 @@ class _MercadoPagoScreenState extends State<MercadoPagoScreen> {
|
||||
content: SingleChildScrollView(child: Text("Cancel Payment?".tr())),
|
||||
actions: <Widget>[
|
||||
TextButton(
|
||||
child: Text('Cancel'.tr(), style: const TextStyle(color: Colors.red)),
|
||||
child: Text(
|
||||
'Cancel'.tr(),
|
||||
style: const TextStyle(color: Colors.red),
|
||||
),
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop();
|
||||
Get.back(result: false);
|
||||
},
|
||||
),
|
||||
TextButton(
|
||||
child: Text('Continue'.tr(), style: const TextStyle(color: Colors.green)),
|
||||
child: Text(
|
||||
'Continue'.tr(),
|
||||
style: const TextStyle(color: Colors.green),
|
||||
),
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user